Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp27219imm; Fri, 21 Sep 2018 17:21:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV60nIz3Gge41uc0hkaXCaadAznnj/1bAKskR7ocCTjKEvar980m2JdIQA9JRHg8IS0kDL3HA X-Received: by 2002:a63:740f:: with SMTP id p15-v6mr96798pgc.395.1537575714423; Fri, 21 Sep 2018 17:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537575714; cv=none; d=google.com; s=arc-20160816; b=CaeaXQvwe4r7SZiSLMHlk8XblH36JZBvVtZOghzJMXtRC9cV5u6WIMH/kHKFA70Ac+ npItl1qA2k9C4AnDotnwy2R2U+wk1J5PU28+fBEOGHlylGl4jK+MrevGaMT+3U8shDiJ qKUuM9QEldI9fV6TW+umVr7K7Ta6Lw2j7aAeoCGGDd4DEWLulKolvcFJvBZlAlo0iZV/ 3mL+Pk1TGHad08R4GhC1eC6SAudYaak3hchUlSMojGtiv5YoPmbKHtmhRt9Qwy3gW/bm AW66WA3D7P9tHi0HD3WIzjHdxIbGx31CcThHx88aoT8KoCboUFyftRLPPzAA5K23czuR 4H8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:message-id:in-reply-to :date:mime-version; bh=4tA88TLPwMdDTqdkaaoMo4ME+HYOUnR76EVicgKx82s=; b=pYyOyStjpHMi+SGZvDgcE9ClHYaTd2Q+8X0noTfGnchtCn9lN/JiuVyybDCvYW1Izj 2n+/h+V0MjKUPMOBNEqoqO5zYCUtsw+PHAiDS75ukdGVuLtqWnQkTmQDkK9L31BZIePq gtbgkVHWZNxEqR8YgXl81LHrPTNEgE2s+UhxnDMFQzj5X7K6PuiXa8e8f0PrJNacJu/9 Smba3Nmh1fvms0odthSGURGBZyY/hwD5biBEOl4izALF5QBmzzZyFsSOSl4wwaTlXcjl gslm4wBb2AlhpR7kgmYFstC6FZhfUXM8jpL5sTeTgf6G6rmj8uItczss3lV3NpNKKJrj r3XA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d68-v6si32482527pfj.311.2018.09.21.17.21.38; Fri, 21 Sep 2018 17:21:54 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392162AbeIVGKy (ORCPT + 99 others); Sat, 22 Sep 2018 02:10:54 -0400 Received: from mail-io1-f69.google.com ([209.85.166.69]:41294 "EHLO mail-io1-f69.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392140AbeIVGKx (ORCPT ); Sat, 22 Sep 2018 02:10:53 -0400 Received: by mail-io1-f69.google.com with SMTP id q24-v6so26101716iog.8 for ; Fri, 21 Sep 2018 17:19:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:in-reply-to:message-id:subject :from:to:cc; bh=4tA88TLPwMdDTqdkaaoMo4ME+HYOUnR76EVicgKx82s=; b=SXWCayAGwk1lSy/eUhBfUoHncEhLi+VQSmbyOctTxkuzxbhLSHG8NHEuSWRA9wMvZG OgKnapThfEFOwJrWEeMdHJGMm7S6jal0XlNbGBSwSHyFZxe3pLaO7j8xDwWhdvLcQ2uj oZFx/aYCUW0mf4U4xm578u1jsmldeHQs++tp5lw4cLkxYFS/Awy+CWEZszOhTZ8qo8QF tBpYWF2VtT9I/c+VzKev4qImvvXwshCoxG3kb1M5UB5owBrdVHR3tw62DdQgywE/rc+X fVo3UxQRpekclX9EIGztThXapnK3wv2kkjlfdn2gqeu7adkrdjfx7pty4h1I3H4qhcOq oxmw== X-Gm-Message-State: ABuFfohpOAbxDqkafB5byAVVMCRTzt8SE3sHXa+2UV0wRp8zDangLp7+ X6LoIdV/Icd26aoK9vW6SGvctYlZOETxg+4aykAXugihHqlm MIME-Version: 1.0 X-Received: by 2002:a5e:c104:: with SMTP id v4-v6mr114038iol.9.1537575575770; Fri, 21 Sep 2018 17:19:35 -0700 (PDT) Date: Fri, 21 Sep 2018 17:19:35 -0700 In-Reply-To: X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000025c4a05766ab6be@google.com> Subject: Re: [PATCH 3.16 20/63] scsi: sg: allocate with __GFP_ZERO in sg_build_indirect() From: syzbot To: Ben Hutchings Cc: akpm@linux-foundation.org, ben@decadent.org.uk, dgilbert@interlog.com, glider@google.com, jthumshirn@suse.de, linux-kernel@vger.kernel.org, martin.petersen@oracle.com, stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 3.16.58-rc1 review patch. If anyone has any objections, please let me > know. > ------------------ > From: Alexander Potapenko > commit a45b599ad808c3c982fdcdc12b0b8611c2f92824 upstream. > This shall help avoid copying uninitialized memory to the userspace when > calling ioctl(fd, SG_IO) with an empty command. > Reported-by: syzbot+7d26fc1eea198488deab@syzkaller.appspotmail.com > Signed-off-by: Alexander Potapenko > Acked-by: Douglas Gilbert > Reviewed-by: Johannes Thumshirn > Signed-off-by: Martin K. Petersen > Signed-off-by: Ben Hutchings > --- > drivers/scsi/sg.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > --- a/drivers/scsi/sg.c > +++ b/drivers/scsi/sg.c > @@ -1825,7 +1825,7 @@ retry: > num = (rem_sz > scatter_elem_sz_prev) ? > scatter_elem_sz_prev : rem_sz; > - schp->pages[k] = alloc_pages(gfp_mask, order); > + schp->pages[k] = alloc_pages(gfp_mask | __GFP_ZERO, order); > if (!schp->pages[k]) > goto out; Can't find the corresponding bug.