Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2393705imu; Thu, 10 Jan 2019 13:25:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN5AfSgjtgFdoPlYjuKDdlAlq2fAgzpHnBMoZZCQWi45Jek9Pt3HFBikUIABeM6mew8c2waP X-Received: by 2002:a17:902:925:: with SMTP id 34mr11525231plm.14.1547155550455; Thu, 10 Jan 2019 13:25:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547155550; cv=none; d=google.com; s=arc-20160816; b=M3n5uJMTJ0Iilf5NaNi1yCl9b3Kzzxd/zR5m43daHif4qEr3uXR9sYZggdPkLIbME+ An1iqpuqau9fsKN1jj7Fqjcxn8njbj9Lx7g3IJ4MX1DzSQX8blLbCuGBFZ8xNJB6GsbJ ix/e0v7TFzbdYoI9FTfDYIxuIFTCLQGMfgzwrbsUW7I+SMW8E1AdYAW9hnmvCzv6iwlM nQMQndKZWuAIGoPYq8ZVRhKXqCHfY1JTbladfoWCBP8P1lHFR9x78FM4tuteN8JnfPyF GTqZqwXySG/Qrw4aeYwCopmCwPnusGZh7FxjJQqkOzXjiLDy9VhQEIzCcIBcc7xgKEjb jRrA== 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:mime-version :references:in-reply-to:date:to:from:subject:message-id :dkim-signature; bh=BM10tUvFqe2/qUpdcNvy1XQgs7cykrDXn4NqoVqHHkY=; b=uhrHY4xqkhy/RdRFYP4Kpp0ELuZk0bNjvns3XdSTIJV2D6eGegeLYlybxvSL/aklod wHH6Oez3Txy4F7VYQnm4GqAaeQR96cHC4FeBW8FeE169WrWvLd+lv0dHedvsiG3mb3MU ONSlGhX3i1Jp4vyGWIMJZXt+bJBUDXfFA4tSu3uB6fwRmPF23lzkKWNdY11D++RQ92Uj h5jRs8rohWWvxN+tjH9OnTRizB0jdjgaMDgGeEsHO7s/w6kirnkcnjX6B/xAVsQ9E0Ir vmXZcvjAeDb8WVr48y2UfGG/LI4oKIulJ7XiOE6wYtDDIs7Jp8PE4jaVLDkLWg4pMsO/ YRcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=Q6mPHXay; 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 s8si21844333pgm.508.2019.01.10.13.25.35; Thu, 10 Jan 2019 13:25:50 -0800 (PST) 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; dkim=pass header.i=@lca.pw header.s=google header.b=Q6mPHXay; 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 S1730443AbfAJUjz (ORCPT + 99 others); Thu, 10 Jan 2019 15:39:55 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:37748 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729743AbfAJUjy (ORCPT ); Thu, 10 Jan 2019 15:39:54 -0500 Received: by mail-qt1-f195.google.com with SMTP id t33so15283742qtt.4 for ; Thu, 10 Jan 2019 12:39:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=message-id:subject:from:to:date:in-reply-to:references:mime-version :content-transfer-encoding; bh=BM10tUvFqe2/qUpdcNvy1XQgs7cykrDXn4NqoVqHHkY=; b=Q6mPHXayVjek0lCitJARjuKVeid7Jc5go7wKFZq3bHcPjCrVC9Dsm7ChkkeoysRtyx BXgrutc2eJVsQvb2iHHu7lwoYRxXCTFjC6RQQCCdPHhnX2BbaTb5h14Z/mjgIr7yMV12 axEsxiKKxUluoB3lwIW5yGeSdGKgUgwcj5sO0ufz0m10FPs/nEYwonKSMH7tIYX17lrj 09mqVdXPYhWG0pOqlWSwxE/Hbhro3lfU9KSQPtOXvrKF1mQQ1bbOVgAdhR7MrRkax0EN vlK4qmrM2NLad0H+XYUfvUbR62pYPZUcV5WZV1IVmbR8p4nIYlc5U3Q+Ly48te+pdztM q0Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=BM10tUvFqe2/qUpdcNvy1XQgs7cykrDXn4NqoVqHHkY=; b=Gx/XTMgShrGlmpAMAa5hm92ESE7xiEBoslkk7TFk2uPmULc4zI04GSTGD8zocA2ezH PCfbSfgeSUVW3BSLRm/iqPiLNnIxw4SsHznqfWZd+deBwk459pESDm023SokZEMVvVFJ 5X6VUNGWVF5fQhJ3rezwH9j/9BdO5jmlpqycTUnMDV1eDIFHGdatjSowfKy5EdczHNV2 A2sJ0Zq9urtNJ4TrTSg7VdydoUuNU8ZLlbkR/VY3v2JH0RaLp4sSxobDJXdcFyKLTlyt b57vU2MWkHAmemGWAfjMb0WjsljgZBERmtOsMu20bhjVt2pAZFQijpHqnb3XfON+IeFh BAlw== X-Gm-Message-State: AJcUukfWE3UyNOh7eoF1dyz3KGaD27yKtiUan180YwKK/2J3DvVsPFFD wdunfSrFoN/MgniLMgGDseEtlA== X-Received: by 2002:aed:35c5:: with SMTP id d5mr11137276qte.212.1547152793305; Thu, 10 Jan 2019 12:39:53 -0800 (PST) Received: from dhcp-41-57.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id z30sm48643977qtz.26.2019.01.10.12.39.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Jan 2019 12:39:52 -0800 (PST) Message-ID: <1547152791.6911.6.camel@lca.pw> Subject: Re: PROBLEM: syzkaller found / pool corruption-overwrite / page in user-area or NULL From: Qian Cai To: James Bottomley , Esme , "dgilbert@interlog.com" , "martin.petersen@oracle.com" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , linux-mm@kvack.org Date: Thu, 10 Jan 2019 15:39:51 -0500 In-Reply-To: <1547150339.2814.9.camel@linux.ibm.com> References: <1547150339.2814.9.camel@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-10.el7) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-01-10 at 11:58 -0800, James Bottomley wrote: > On Thu, 2019-01-10 at 19:12 +0000, Esme wrote: > > Sorry for the resend some mail servers rejected the mime type. > > > > Hi, I've been getting more into Kernel stuff lately and forged ahead > > with some syzkaller bug finding.  I played with reducing it further > > as you can see from the attached c code but am moving on and hope to > > get better about this process moving forward as I'm still building > > out my test systems/debugging tools. > > > > Attached is the report and C repro that still triggers on a fresh git > > pull as of a few minutes ago, if you need anything else please let me > > know. > > Esme > > > > Linux syzkaller 5.0.0-rc1+ #5 SMP Tue Jan 8 20:39:33 EST 2019 x86_64 > > GNU/Linux > > I'm not sure I'm reading this right, but it seems that a simple > allocation inside block/scsi_ioctl.h > > buffer = kzalloc(bytes, q->bounce_gfp | GFP_USER| __GFP_NOWARN); > > (where bytes is < 4k) caused a slub padding check failure on free.  > From the internal details, the freeing entity seems to be KASAN as part > of its quarantine reduction (albeit triggered by this kzalloc).  I'm > not remotely familiar with what KASAN is doing, but it seems the memory > corruption problem is somewhere within the KASAN tracking? > > I added linux-mm in case they can confirm this diagnosis or give me a > pointer to what might be wrong in scsi. > Did you enable page_poison with PAGE_POISONING_ZERO=y ?