Received: by 10.213.65.68 with SMTP id h4csp1163163imn; Wed, 4 Apr 2018 13:49:14 -0700 (PDT) X-Google-Smtp-Source: AIpwx487AsL/xHpuvpIcYQSvmJkTR/7+50281XIWfYsY0XLR+3DoNRvAp5T3XXrFqX+7oz7dmXk3 X-Received: by 10.99.96.84 with SMTP id u81mr13050480pgb.231.1522874954566; Wed, 04 Apr 2018 13:49:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522874954; cv=none; d=google.com; s=arc-20160816; b=wr8IBrwEHemf89rEX6OulJn+zxJEiRLykGz8fN83/M1S1L3RiiD8XkZ/3Z8pd1p5u7 J2JVvUi40AL7hlzssDUppQHaEit2CR7GvQqpLn7uWNQfYYXcKZEXw+YSWMlgKfgNkisg ntfvTQ5aENdWzlu1fMWCtkpCD2AMaaOpISJw/WNCyXa+UM+QQQ+41t270aVpBhf4EeNV +4Ffj/6LZ812+KIbSXVW4lCsQGZuXktvZTPkwuSFJO7hxXfHYBez989V9P6H0joLF1Iu eKhvRL45g9pbnKoGCu1qwgq6WQXtAaOw4bDRBB4GaASHdxaGLuJ6ma1Y9RwWDU/ZWvSi kWpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:reply-to :arc-authentication-results; bh=PCSX2YFqZXKUhOkcV5YCq4K+er00wPz0Iou6NIJwH4w=; b=NybWnvIOw4CKGq0vvdFPA3iSBE7y+paofnEIFJXY+5umw26A8SHUQKa03oza1TudDk kOinKUiNuR5UE+AVNqi7cVdnMOGqxFoEmDUM1f4HmP0zX6uSGP9ePbachF35n+LHTzFP tzZ4EIaTo51BbqkzWPDv8uctgbt+Lj172YzVOU4I11xFOwmhbqiu+e09juXawWwxNqyE LOMibNIbhNil9ModgiqvuO1wNMgizzq7tYUtgqnw7crzqjAlilG+nAZDhnUgh+gw6jsa DLJfbslcSKUXQ9S6GsPYyWw9+FzRnGgbWPXO8vVlKVLtkMAxTMnqY9ksSwmjy0A59kUT yPOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v2-v6si3988422plo.670.2018.04.04.13.49.00; Wed, 04 Apr 2018 13:49:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752282AbeDDUrS (ORCPT + 99 others); Wed, 4 Apr 2018 16:47:18 -0400 Received: from smtp.infotech.no ([82.134.31.41]:35726 "EHLO smtp.infotech.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751982AbeDDUrR (ORCPT ); Wed, 4 Apr 2018 16:47:17 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp.infotech.no (Postfix) with ESMTP id CCA9F20417C; Wed, 4 Apr 2018 22:47:15 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.6.6 (20110518) (Debian) at infotech.no Received: from smtp.infotech.no ([127.0.0.1]) by localhost (smtp.infotech.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kqZ-ZMME-MNO; Wed, 4 Apr 2018 22:47:14 +0200 (CEST) Received: from [192.168.48.23] (host-184-164-15-239.dyn.295.ca [184.164.15.239]) by smtp.infotech.no (Postfix) with ESMTPA id 60348204179; Wed, 4 Apr 2018 22:47:13 +0200 (CEST) Reply-To: dgilbert@interlog.com Subject: Re: usercopy whitelist woe in scsi_sense_cache To: Kees Cook , Oleksandr Natalenko Cc: David Windsor , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, LKML References: <10360653.ov98egbaqx@natalenko.name> From: Douglas Gilbert Message-ID: Date: Wed, 4 Apr 2018 16:47:12 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-CA Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-04-04 04:32 PM, Kees Cook wrote: > On Wed, Apr 4, 2018 at 12:07 PM, Oleksandr Natalenko > wrote: >> [ 261.262135] Bad or missing usercopy whitelist? Kernel memory exposure >> attempt detected from SLUB object 'scsi_sense_cache' (offset 94, size 22)! >> I can easily reproduce it with a qemu VM and 2 virtual SCSI disks by calling >> smartctl in a loop and doing some usual background I/O. The warning is >> triggered within 3 minutes or so (not instantly). > > Also: > > Can you send me your .config? What SCSI drivers are you using in the > VM and on the real server? > > Are you able to see what ioctl()s smartctl is issuing? I'll try to > reproduce this on my end... smartctl -r scsiioctl,3 ....