Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2277687rdb; Tue, 3 Oct 2023 16:37:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGlprakoUn61mdLTqitlLv258L+3CtXRzZ1iM9KJG5/TwO8DBzYSBbWcZ1geJX9ISUTK9sM X-Received: by 2002:a17:902:8c85:b0:1c8:7489:56e2 with SMTP id t5-20020a1709028c8500b001c8748956e2mr740977plo.35.1696376254481; Tue, 03 Oct 2023 16:37:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696376254; cv=pass; d=google.com; s=arc-20160816; b=h83z5K3LNmy+PIk1aPOOwBV7ALe+tYT8s6ahEZAv+/DcFDvf4v685Rziu3whbnjdrZ zCEqg/ZFT6KRO/l4C5UyXp+RewM6jzN6VarUhLG1JYOExAobPfK/XfI7hSwzI/PnKXU0 54UmqtkgsRyUFCDG3WumoMUFpHCbbcsyRl8jrmH890QTVCPAuT871/Z9jBGfWp91hx/M U5Rud3b0E1trkSrNMqRrKNPp40tFMv4fn0+65so7iPiawiY8Vv6y44Xk1eSAnLKmx28b gQvInbZsXbOqzrC1KBeKhxnzEBl2ygMBIREgeRMC13EEaVHb6gnLB9mtJwwR0KcdEx+E iw0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=MqbFCNu6RUTnO3Dy6lHzmlygQxC/mM3Cb1a+SVhH7PI=; fh=DJwVLQKCaqJI9Tu2UZ8oBSslbRBIGYsCtoL4r8yjbBQ=; b=ObEvkXgo0Mz8dn9w2mSr6FdnW66g+Kx0H2LH7GxMmc+icQ9qbjn+EuufFv/mf7ymPx J4Wp1RSDO5Y3dzOtboYHTWRKFJDfkm+fsIUQZeC4UPn/qxASyjjxa1zZ/GoSDasMGp9i UTvc1mAw9gUBLL1qzbt5eyEfWQyQipnsNKbPW1hp6mwVlaBIXZ4VHm4mdWc20UET0k2z HNFm/W3CZozeTeSZi3lvAsyAHsGfGyM5Rhv2P4WRz1LQOQOw6MQqyxQZ8aGn5oPala99 WpGwiUgxd+/JjqNfZmTH5y1VggRVhbQFO3oQZ5rW6/d7X8ZrNCj/kErmnKCb9JXNkqwL bNXw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=Ar5VQMvf; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=WtB8Jgeh; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id u7-20020a17090341c700b001c362510a4esi2718060ple.613.2023.10.03.16.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 16:37:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=Ar5VQMvf; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=WtB8Jgeh; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DFC5B819AD84; Tue, 3 Oct 2023 16:37:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236853AbjJCXhA (ORCPT + 99 others); Tue, 3 Oct 2023 19:37:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236850AbjJCXg6 (ORCPT ); Tue, 3 Oct 2023 19:36:58 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D361C4 for ; Tue, 3 Oct 2023 16:36:53 -0700 (PDT) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 393I4N5k004021; Tue, 3 Oct 2023 23:36:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=MqbFCNu6RUTnO3Dy6lHzmlygQxC/mM3Cb1a+SVhH7PI=; b=Ar5VQMvfF6bg29d3nTi5rs5UO3NsNkLwND4IIZWMEjX96hLjcGP/bWHncJc+hAZfdvIU 0SzsGuqWYAuBqWEtFp8NToj0n1pijuzdHvDuIik6rrGJqv8eBheY/UOM4uhE3WFLvNnP oM/tA80ZI2M8Ulx+RaAsIncZKvqVltvrKiGpUv7/ism6bmy+phf2uPIMP66BxRfvtSdl VOu7Ra6iE2yWee07zPUhv/D4VJ1aSXaR0a5cqzMA8Sz7E/alMMkzaVVBp7u32aPV4LAd pNXSco6llxdrhGp0AUxyxsU1L8ccNa1UK7g6YhrMOnaPVSGokzIE1rCxfjHRISSjozmu sg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3teb9udwkn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 03 Oct 2023 23:36:31 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 393MUgxw002877; Tue, 3 Oct 2023 23:36:31 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2168.outbound.protection.outlook.com [104.47.57.168]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3tea46rwjf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 03 Oct 2023 23:36:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ktxWKUzB3R/bMZSMUZdy1+DnMP9zSNGLDu4xRnzLgeAwAztQIBAhuLKM2VlKUaQET9Kak/2r03VsX7jzzueBDWAIsGWIJQMruTY6KxNOGT7NuinnI8gFxlo+3PLae8rW40WZWa0+XVI+rqHWphL2ALEptKkLRx7xaEIqyl6TnFzZsZxx00oQYHeBhSx/bvKFKMPSNGCfKULW8af/eCDagGgcPaA3FyZ0wBR3oWNN4uvsNdn17KNUV20LUBCbCWG81hPhVUcBitRU/2s2vUUyWyeJtOL00INViNK8HU9hHZFmfUqSqXIhRtKeWb97Fr9g0REHoWfXmgMTxFjzHRLCwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MqbFCNu6RUTnO3Dy6lHzmlygQxC/mM3Cb1a+SVhH7PI=; b=NVl/09trrZY7WCnGQ2w6QbzhKqm532ELBxt9klqtm6nuZErMFJupCgTZtGgiPZHlZz6F6kH1A+nvkdJ4v7GJldlhFbi+uWjriMlJav0McFmnjR3pMFeikKBLjCu9FmakKwvFkvewLLzpMdF586dLK8u1iNhHx2ziiqj2Nn2rHrTndsz6sNLYU+g2wUzIufvoDSqdY35x5PS/yKTGjzaq9ViV6c1ccadLa/RuOPbVQVlcOz6vGBxAi1B7zkiarRwMQCkMtTz46k9qkAsnPPTYkxPO3+zob4g1CFGzsqD+XflxijIsunLmxHso/NeyjcNam5ls9NUpJUuwma30IWjnPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MqbFCNu6RUTnO3Dy6lHzmlygQxC/mM3Cb1a+SVhH7PI=; b=WtB8JgehyArQ6KJaykdpUqpHn/rgPhbi8JnTm/UcDsXsifCkRulWno7n9GfjtjxbsARg95pVccnIz2BheLMKflSkuOOqEL7GV79xW/IiVHq0bc3o8Rz5r3AesXlgq7Nim00ODBPAP5nrlyrSYDVqMdAHYvu3szKUse+OSgHep3Q= Received: from MW5PR10MB5738.namprd10.prod.outlook.com (2603:10b6:303:19b::14) by DM4PR10MB5967.namprd10.prod.outlook.com (2603:10b6:8:b1::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Tue, 3 Oct 2023 23:36:29 +0000 Received: from MW5PR10MB5738.namprd10.prod.outlook.com ([fe80::5943:cf66:5683:21be]) by MW5PR10MB5738.namprd10.prod.outlook.com ([fe80::5943:cf66:5683:21be%4]) with mapi id 15.20.6792.024; Tue, 3 Oct 2023 23:36:28 +0000 Message-ID: <5d03f98a-262e-441c-812e-8257d66680c5@oracle.com> Date: Tue, 3 Oct 2023 18:36:25 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] fs/jfs: Add checking for out-of-bounds index in binary search in xtSearch Content-Language: en-US To: Juntong Deng , cuigaosheng1@huawei.com Cc: jfs-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, syzbot+76a072c2f8a60280bd70@syzkaller.appspotmail.com References: From: Dave Kleikamp In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: CH2PR03CA0025.namprd03.prod.outlook.com (2603:10b6:610:59::35) To MW5PR10MB5738.namprd10.prod.outlook.com (2603:10b6:303:19b::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW5PR10MB5738:EE_|DM4PR10MB5967:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f5a6e30-32cb-4752-9be2-08dbc4699104 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?utf-8?B?bCt5UWYxazF6RFlWMVBQZklJdWZYeGQ5VFlBVTlFSDF1QmRTOFAwQ1N2Nmlx?= =?utf-8?B?ZzBLUnlyaHVCOTgwVXlZY2drQThBaWwxVjhxRDZKUW5LSStla0lSSkhuM1dX?= =?utf-8?B?NmhGS2FuSnAwYm93MkdQalZTK3hacnRRTkJ0aXZEbjNLZ0xUVU1CeEVlMCtY?= =?utf-8?B?QVBycTl3Z01ZU1BFaDkxMmYycVo5Ymp0b1VIWVBiTlZSeWtRdXRCbzl5OHJs?= =?utf-8?B?V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?= =?utf-8?B?Nk5xUGNQSE54VU9ic3lNaDd3VHdScFFBZ3ZyTEJDdjdoMEx4TFZ1T3EyU01E?= =?utf-8?B?YTFKSlUvVUxXWjk1VlBsd1YxTGVhMVViZytZdks4dDF1Sm1xWUo2NityOXBF?= =?utf-8?B?dHpRRU9ETXU0dU5vZTcrbktHTkx3eXByeFBQeWN0Tnd4SFI0WkV3bXNqdGdu?= =?utf-8?B?TGhBdGhhbFdjR0IyQm9rVEhlaEI4eng2RExwZHk1SkNQbHJSMkh3aTJXL29W?= =?utf-8?B?cFVpajRUYjJ4bk14eXVodlJ2Ym1ZZDBXRWpZTE1tb2xNUldpUWY3d2tSbG5H?= =?utf-8?Q?JuHr3XvF?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW5PR10MB5738.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(39860400002)(346002)(396003)(366004)(376002)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(2906002)(6512007)(2616005)(6506007)(38100700002)(6666004)(316002)(45080400002)(66946007)(66556008)(478600001)(86362001)(31696002)(966005)(83380400001)(6486002)(26005)(66476007)(41300700001)(44832011)(36756003)(5660300002)(8936002)(4326008)(8676002)(31686004)(99710200001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aW94Qi81R3pucFc3ZjErQ1Z1RU5wTVB5dFVJM1NGdjZtN01sZ2xDV29oUkFs?= =?utf-8?B?RFByYmRodjZlWFR0RWF2bitmRmpFa0NIVU8yaXVhSzdMaXhCNGh5UUtQRytv?= =?utf-8?B?bEhrQUlGc3A3OEtMY2pQRFV3MXpXd1loU25Hai9zc2xGWHVHN3lUSGMyQ21z?= =?utf-8?B?SW9CVnEwSTZnUkMycThlSnpZNmFhYU9UUE5ZSUkvVCtLSzgyM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T1VOd2tqMzZpMnhobE1CTWpYaEpJ?= =?utf-8?B?U1RCTlJ3S2pxc2ZSTUxZZ1FuUEF2V3E3MW9kMDJzRmwvN1c4V3VyRloyaU9E?= =?utf-8?B?Mm1naVNlS0F4L21DNHB1bS9aNGR0cjlYRVdaekg4Z2cxcWV4UHZlVG96U0RM?= =?utf-8?B?VGI1ckNSZE5iZ2dPRWxIRDltSXhRRnNrTk9mM281Uk5IRDZyT2VETG1TQU9x?= =?utf-8?B?MDFHWVE5QkZFS0NzN1FJNFB1U29FNkJObTNkL1dCdllJVFkrOVp1WjBqM2pk?= =?utf-8?B?RmJFckVLeHpGdHBVMWJBVTBoSXN0VkFucG1PRFdpdzdrVjVwTEMvZW5Vdkx4?= =?utf-8?B?SUhvOThGU0hpd0R4eUNZd3EyZ2Jhb2NTV296a3YxREpmRk1sMXF2RisxTUNr?= =?utf-8?B?OUowUlNiVXlDY1diMzFuNHlQZzVib21XUVM5RzR5bUV6Q09ZOGtLampKZTlq?= =?utf-8?B?VytsMU0rbUVlT1I2TjBsZXpMZklyWTMrZlhkbzUvUVpmcjN6TkJHd0l3VGFF?= =?utf-8?B?dHR1Q29SMWdBT0NLaUtVaWZQYWozZWxob1dlS1BocDFRSXZLYkx0dHVJRmsy?= =?utf-8?B?NTYwMzQ0bHA4NWRPQVZpMmRFOVd4NG15a0FWSThOWGJlOE9oVld2VUtFUFU4?= =?utf-8?B?d3JYZjZBekxmQkxhL0Mva01WUkM1cEZkRjYxSzZJcEo2eTZXeXVGeHovWk1E?= =?utf-8?B?NkVSZG50bSt1RjEvUVJWZkF6Y3MyQzJCaC9IQzBENWhpdW0zSm9oa0NDSk9U?= =?utf-8?B?UllHZzVTMDdPckE9PQ==?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f5a6e30-32cb-4752-9be2-08dbc4699104 X-MS-Exchange-CrossTenant-AuthSource: MW5PR10MB5738.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2023 23:36:28.8252 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EcOoLajzcZrMgNt9Ys1DYQveoRp76OpLJTRuHco9Cu6e1Xt1wQKh2o7Pbv2J7M4SRwjaHK/7tov29oJBv8R3x9tdKf6uhhKdNqbM17WcsF0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB5967 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-03_18,2023-10-02_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=862 mlxscore=0 spamscore=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310030179 X-Proofpoint-ORIG-GUID: 94y23-3zhyE3okwzNFc7ZGfj0xI6Ud30 X-Proofpoint-GUID: 94y23-3zhyE3okwzNFc7ZGfj0xI6Ud30 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 03 Oct 2023 16:37:32 -0700 (PDT) On 10/3/23 5:49AM, Juntong Deng wrote: > There is currently no out-of-bounds check for the index in a binary > search, which may cause errors. > > The following is related bug reported by Syzbot: > > UBSAN: array-index-out-of-bounds in fs/jfs/jfs_xtree.c:360:4 > index 18 is out of range for type 'xad_t [18]' > > Checking if the index exceeds the size of the xad array can solve > this bug. This won't work for the same reason I talk about here: https://sourceforge.net/p/jfs/mailman/message/40826617/ The xad array can be either XTROOTMAXSLOT or XTPAGEMAXSLOT entries long and it is declared with the smaller number since it's included in the inode. I will fix the declarations so that we can use the larger number without triggering code checkers. Thanks, Shaggy > > Reported-by: syzbot+76a072c2f8a60280bd70@syzkaller.appspotmail.com > Closes: https://syzkaller.appspot.com/bug?extid=76a072c2f8a60280bd70 > Signed-off-by: Juntong Deng > --- > fs/jfs/jfs_xtree.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/jfs/jfs_xtree.c b/fs/jfs/jfs_xtree.c > index 2d304cee884c..6b55bb1e4089 100644 > --- a/fs/jfs/jfs_xtree.c > +++ b/fs/jfs/jfs_xtree.c > @@ -356,6 +356,8 @@ static int xtSearch(struct inode *ip, s64 xoff, s64 *nextp, > */ > for (base = XTENTRYSTART; lim; lim >>= 1) { > index = base + (lim >> 1); > + if (index >= XTROOTMAXSLOT) > + break; > > XT_CMP(cmp, xoff, &p->xad[index], t64); > if (cmp == 0) {