Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2039354imm; Mon, 16 Jul 2018 00:40:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeZO3+S6l85EDmj01J0Oz/HWxT+6jiZWQSb50+FT97+mYEEQat65a9QUcJ17dicRBNbX++E X-Received: by 2002:a63:7252:: with SMTP id c18-v6mr14229499pgn.186.1531726815898; Mon, 16 Jul 2018 00:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531726815; cv=none; d=google.com; s=arc-20160816; b=myHGnyj+bm1WVUm8G61LLqRbQ7pjIHJtNSKRpLywHPO5BQfwq+90VRo1K9uQ8V2qv4 KQNDbsVw4tEVZ0eTHf83wlGwrWzrtVTLWr1ZJqi78HWhWGqXe7YZJUC58biBwA+qHJBq Ta+yuZVxbQrZpl9PqnZCUHKY6Q1bDN2nhxTT4PY7vriuKgiNPsBL2fijdW5LEUJC7F6F ppEAnQ31khcfpYMrMjnUG1EHzLIgMp6RrOkR0KOWoYFBxmcWVkmDspI8NnSdFB9UW5os OM6mwwWDhMyaTotumHmW4EeSOGm9D28tO/m1XGOAQLuuW12TCISsO7DXanBg289tZ+fY 4Rlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=NqKdVd3z+Kb/xgkl9rF5V7eToIW7l11Ny8+V4VeIhjs=; b=ngta5zZdpzmWu9LgWQ2aB1EliqqL9H6g4jsNDg1zhYmPGpGfyTkKBV4wP9XwMgs3sl hAVKxevI9tsQ1p8jjqumtV8bycWWaC58FM5YnnTSV7t/EFWpcXDnToQGvYr0FQTqsmWI hLibSZET0RwU2DdBYbLFZtWlgfjp/kQuNkdiG39cHfi3PNZC6pasMPfmJVKPz0CNwdn/ 3YQVI8DXMv/rmP904MBmtoj+xhd0QT1PPlROkkS3uysy/1FdFGOz1CcxgPwMkEGRPDuc iDuOhYm+IEJn+2XVIGfZbDmHFQx9t5Z8OGmGuOw4SSSP0Q8Nf+ubCIC/UAFMcj6IaRPQ mUJA== 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 1-v6si30232120plk.19.2018.07.16.00.40.00; Mon, 16 Jul 2018 00:40:15 -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 S2387778AbeGPIEx (ORCPT + 99 others); Mon, 16 Jul 2018 04:04:53 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47012 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726898AbeGPIEx (ORCPT ); Mon, 16 Jul 2018 04:04:53 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 655E6C03; Mon, 16 Jul 2018 07:38:51 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+08ab33be0178b76851c8@syzkaller.appspotmail.com, "Darrick J. Wong" , Eric Sandeen Subject: [PATCH 4.17 58/67] xfs: fix inobt magic number check Date: Mon, 16 Jul 2018 09:35:27 +0200 Message-Id: <20180716073452.939919041@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180716073443.294323458@linuxfoundation.org> References: <20180716073443.294323458@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Darrick J. Wong commit 2e050e648ad6c74a2f0a28f645155128be0626ca upstream. In commit a6a781a58befcbd467c ("xfs: have buffer verifier functions report failing address") the bad magic number return was ported incorrectly. Fixes: a6a781a58befcbd467ce843af4eaca3906aa1f08 Reported-by: syzbot+08ab33be0178b76851c8@syzkaller.appspotmail.com Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Signed-off-by: Greg Kroah-Hartman --- fs/xfs/libxfs/xfs_ialloc_btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/xfs/libxfs/xfs_ialloc_btree.c +++ b/fs/xfs/libxfs/xfs_ialloc_btree.c @@ -296,7 +296,7 @@ xfs_inobt_verify( case cpu_to_be32(XFS_FIBT_MAGIC): break; default: - return NULL; + return __this_address; } /* level verification */