Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp979051rdb; Wed, 1 Nov 2023 08:07:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGi2n1VmAAqke62Orip6LFvKyv7kXzg5WLHAT9iWceXjpkrWgMAd1/0SemtbKqDX8WCBKdV X-Received: by 2002:a17:902:ec88:b0:1cc:4488:afba with SMTP id x8-20020a170902ec8800b001cc4488afbamr3915004plg.6.1698851263980; Wed, 01 Nov 2023 08:07:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698851263; cv=pass; d=google.com; s=arc-20160816; b=I/SVR88GUWmabEsn406tTgF1wRGivLQuas8vSztdYufBikQPtX9E1MEngs5KsVikYZ 6jvYTayIktEKMV/593kpchyvevjobDdUo5j4N1ExFt43SkZU3c8xkboD/wW82mvRPkK9 KRK9h0NLfzXpAvinV7F4q7V5cq82ykML3QqTp3m1aFaPDf0ei2Wf71+wPw1UK+rT7lDb CD+9sfQ8Bi7betcW8UEZfeMarunz6fhIU9len9cvifR9qzNRY2mobu1B1ZCuIfbmllPi tYIhzZxdPod8RuP6Tg8lw2NVHYn61q1UHt4nQUGKFxTF2OUqOgrtRpF/j64QW3AzKtK0 kH6A== 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=+0huDTM/i5Tgh/EztubUY1NMtafM6tZ+wD8uGcxabnA=; fh=UFDjGoVYEm7wqVTvKDn/7ySlSkuzDN0ZSkWQeyzoh/s=; b=aWBVscB0/tHbjNSt6NtZ/K3odFEDBPTsMksbcol9rnyvN4YobbgVSLgXZyqFI0TpjH 5LT8TacdEtfwroYwiQrvRHKh1c3fVlWpTwMMficXmuFWq6u5bNoV8B0gQcHmksgdqJ8F +ritQMW6IV8UcOcrb/jXMk/DtVHVGNxsxe9V1GdnV0W2YmiWU6V6YIpNnJi1MdqIZgBr PD0gV3LUhShSOvhNSS41zI+er+Fq54aHQlbNGIvoa1gw/74HJkz4m0Y0CAPJtiyY9sVc 3xDJYVVAAw8AC0xLAuUN6XU4dlV5sUPodV/PWGaWP66fBn0JV3oB7LoIsKP8jEuQPzSd UD9g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=ItbFwmh9; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=nn7exp9O; 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 2620:137:e000::3:2 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. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id y125-20020a633283000000b0057877ee7d78si43669pgy.575.2023.11.01.08.07.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 08:07:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=ItbFwmh9; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=nn7exp9O; 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 2620:137:e000::3:2 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 2C516803D8D6; Wed, 1 Nov 2023 08:07:15 -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 S232992AbjKAPG2 (ORCPT + 99 others); Wed, 1 Nov 2023 11:06:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232554AbjKAPGY (ORCPT ); Wed, 1 Nov 2023 11:06:24 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DB8AD4E for ; Wed, 1 Nov 2023 08:05:47 -0700 (PDT) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A1A8MhO008098; Wed, 1 Nov 2023 15:05:06 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=+0huDTM/i5Tgh/EztubUY1NMtafM6tZ+wD8uGcxabnA=; b=ItbFwmh9nqgg3pnrncd4Xbe4P9Vpzhilh5J0qzq4nP8Ik64/VHAs6mE/qKX8HgtcllvY U3lIp5dlOvrmLD3LNX70x6UL6QdJZNFwBKcjUxB+fkZtKPi0AbeXe9/HxDFGNAU2ElBz z846fCEuFrMMZWUHQoA3G1b+Vkxfq6+L5m9kXy8EZqIB2yyegcgwu5Ut5ObqnuZIQVtx nVx7VI1XSBtQ24xp+opR0f3w93mAHZJ0ZBZMj5llQ9WY8Z1a5dguvi6CfqbobCM5u3IM bCeOFH42P5/4EHwiwnYuh/lZuDhIGJXw1h2cOwzsJVT3AekIHx/X19pyr3lVvwm/Ev6U 5Q== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u0rqdypq1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 01 Nov 2023 15:05:06 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A1DdQTY020168; Wed, 1 Nov 2023 15:05:05 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2169.outbound.protection.outlook.com [104.47.57.169]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u0rrdd0nx-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 01 Nov 2023 15:05:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P9njd9fpnfcgOV11VU+eKma4oc4Xl4laN2MzL6B9tEGlYPxdWVM3UysAcGuLhGSBAgwR/UqWTbS2Wt+mTe5ocVOH9gcJ7bA9x2Xk9R+Ihr3q6vnQbRGOothxbkL+jKzs+vv5xeeQ0IvhDJVQUYNt/ikvbWlA3bbWcO2sTYaY0dM6riuoBNpTgvCyBu12V1Kf+pcMYn58B+WewFWs37ll/kov6d2M5o7QEXOz7xqJuEBwgKT6hK/FKz1f1GBk4gWY97cxdfS08xswTuYvY0XO1DyUxQey7S0DaBCepu+bFB2HaXhKcf+Kater02Yj5DZFzYCN8XSJrQ7pj2CKg6QpIg== 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=+0huDTM/i5Tgh/EztubUY1NMtafM6tZ+wD8uGcxabnA=; b=aa0fX2hSXB7h4TW4qb6XsMXUUBrN0a6GaE5qwZkeL2GJ3tZFmg348kNOEGTkBpojStSH3uk1092qP3Am8wLAzAop3wPRhicUP66gyicjnQs04CkqIXavf+yQgeAJUcvKszpTTwS4B+WB3f4jW5XRoQL50j7DqviJLDYACkkhz7ynl39f2j6E2NJMfy/1Rev5nOSSiHynZjVTA9NvIxe6cmWjdtVc0lQ5jeIril/VS8jetEHVW6inLF193CZdXp//BfqcA65xCDJXsJNzfpHfmIwLP7zDBub6oDnzFatdOjNRlDKDQJCgHXdO+DPObw6hLztNrYpP/OVd8wuvgKGa0A== 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=+0huDTM/i5Tgh/EztubUY1NMtafM6tZ+wD8uGcxabnA=; b=nn7exp9OvqxBLM6UOL4fRDd5/U8rIPYaxjd+ubi92Jyg564dNvo7VbRI8uRxLOAUceD0+G4AVVC0DkXNctNSPhUjhFF+0oleWZohkGmXgq8w9NeXnHSFRvSwRNHosADp1TqlUsJgttBIo/DY8u3Kc02e4nS3fEQoITnB85MXE1w= Received: from MW5PR10MB5738.namprd10.prod.outlook.com (2603:10b6:303:19b::14) by DM4PR10MB6230.namprd10.prod.outlook.com (2603:10b6:8:8d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.19; Wed, 1 Nov 2023 15:04:57 +0000 Received: from MW5PR10MB5738.namprd10.prod.outlook.com ([fe80::a946:abb:59d6:e435]) by MW5PR10MB5738.namprd10.prod.outlook.com ([fe80::a946:abb:59d6:e435%4]) with mapi id 15.20.6933.022; Wed, 1 Nov 2023 15:04:57 +0000 Message-ID: <5b131b90-513c-4442-bc1f-07817023df71@oracle.com> Date: Wed, 1 Nov 2023 10:04:55 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] jfs : fix array-index-out-of-bounds in diWrite Content-Language: en-US To: Manas Ghandat , shaggy@kernel.org Cc: Linux-kernel-mentees@lists.linuxfoundation.org, jfs-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org, syzbot+c1056fdfe414463fdb33@syzkaller.appspotmail.com References: <20231008174745.27342-1-ghandatmanas@gmail.com> From: Dave Kleikamp In-Reply-To: <20231008174745.27342-1-ghandatmanas@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: CH0P223CA0019.NAMP223.PROD.OUTLOOK.COM (2603:10b6:610:116::7) To MW5PR10MB5738.namprd10.prod.outlook.com (2603:10b6:303:19b::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW5PR10MB5738:EE_|DM4PR10MB6230:EE_ X-MS-Office365-Filtering-Correlation-Id: 10e50842-a616-4a3f-da86-08dbdaebe978 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PIGVYiuyLUNKJvsUJ2XpUwF0KNQ/Kq7oFxolt2oJLjaItzzWxt602lfgkagxEv8HbNvXRFtwERQVUAG1itSuGdNi/bqeQMzH9W/OS2Hfrnx8XOYsDf9n0qfAIqQqB/NZNSRGBgxwspBjGsO4buBYRuQNXwy9Gcro3LdM2wq/b44qO6SIWHlASnwm32QoiW6RH5G58ZeaBiT+l5VhbLSrdMg3L4tjqJ6shApJ9AO/8AprPsfxI426tB+S69Q/S1tXooUnW7XoN71KHY/LdEcxhi1LakJhGKoN9bUDRQHczXN6gmXi8yNYSFNph8tKa6SfEcVYGAs3zGMxk8lAocjyJ3G3dWLF5XCX/kTeQJViNqlPocOusAmXnywN8cPuOK7KBluH5ETyDrM7ejMaWHLYGb9hpiD0QM8MuCmzOEteIll+3Ydg22LYgQX6s14Nhr5yvAK79DBsYpRlHLCg+WVevXHtcNuW3xGGpWlnb9cZPXIijQdUPl5OnKjCT7MSYMEPziSu11utPlod/DCeO8556eZFofydnGYexBvtxWabdVMtm7QkEf+b9e9dIYYSo9GBdPtMp9CIZm3kQGjAxylo0itf7e2ZMgB7ex74kYZa0zEb4Fy4vgCq9IWvwlYJ+0kwRfWGIwNYXb5ZVrsN+DdBW9rRTKANkfFdkgSsRGFpJmo= 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)(39860400002)(346002)(136003)(396003)(376002)(366004)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(31686004)(26005)(2616005)(6512007)(31696002)(36756003)(86362001)(38100700002)(2906002)(83380400001)(478600001)(6506007)(5660300002)(8936002)(66946007)(66556008)(4326008)(66476007)(316002)(8676002)(41300700001)(44832011)(966005)(6486002)(99710200001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dFVuYktTY3VLOXNvN0NxM3VFNXRUeDhmOXgyOGpHYXJwMytMUGZuSkw3cVlT?= =?utf-8?B?MjNPNGFwUmNEbHdPWEFWYXdQL09JczVkS2NKSkc4cHZZb09RY1MrcWpuS0tO?= =?utf-8?B?NFNGMkpsMW9yaUo2VHJEQ1VPanhZTWt2UURGdzFDN2VpVVhHbUFiTGIrVUpG?= =?utf-8?B?UWFrczJpejVxSEdnc3B3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TlpKT0xkWmNRU1N1WXhO?= =?utf-8?B?cks3VkxHMXVDNVZWOW9wQTR3TWpHNlVBdEVQeGhGSzZxRTN3bkl6a0EyczRa?= =?utf-8?B?K2dmOURiRUtVUWZCdE1kOG55NWUydWVDVW14NSt2MTNDK1UxeXhNY2Nna2cv?= =?utf-8?B?TXJsTGJzY2EwdHBSZCt2UzN6K0xuKzJiRGRXNEU3UitPQjBEeXJySUpoY2RL?= =?utf-8?B?bFZGY3pFYkhNK2NLdWVNZTVHZkluQ3U5RlRtcWZOellDdG1ub0V1cU45QlZQ?= =?utf-8?B?QTFkSThicmdEbm5oMlQyS1dyN28vNGJvK3lNdUtoWmw1UmNOQ25iZHBSdXhP?= =?utf-8?B?Qkc5aHAvTHRFNjYycFZIeU5pcXlrTTNnc0ltQ1NwUTM3Z2hXdWtvSHdHZExE?= =?utf-8?B?bWtxdmNlMENTTlkrRlJQY0FxRXh2cUtkZ3VjcDFWSkoyejBPYVZSUXV1eU83?= =?utf-8?B?Z3NrMXYyNkg4aEhUQ0RxNStRM2l0bjk1UFRQZkxLdGNZZ2x3V1pDVWlMR2xI?= =?utf-8?B?VmRJV3NkNnM1em1zU0JFcGxwV1JsTjhvOGh1S2ljMW9DRnNtVDVCd0p0YVdh?= =?utf-8?B?bnNMeG5lZ2pQQVoyN2NXanBJRTFqSXFoOThpeGxHazVISGdnbE00N1Rncy9N?= =?utf-8?B?dlhYcGdhUmt1MzRlTTBvUFhBSm9PMHBHdEZIZ2lpd3owSzFHTTNFNm5VTGp3?= =?utf-8?Q?19aBTbnioC/T1QPE/4dazv81MFN3m+rUKk?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10e50842-a616-4a3f-da86-08dbdaebe978 X-MS-Exchange-CrossTenant-AuthSource: MW5PR10MB5738.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2023 15:04:57.4127 (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: gKQNvgv4gDqM9jxaGS2Qwp5WRrMNeGhdRV0ZQAk3pTTmU3DV3F12XlL8vIcPrkAeY7B7/kJlN6lgbHwqF56ai3Bbw9hGZxlgHJaOH0qJaC0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB6230 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-01_13,2023-11-01_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 spamscore=0 phishscore=0 mlxlogscore=891 adultscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2311010126 X-Proofpoint-ORIG-GUID: T1DOLoeOkGT8rpFntV8LIAcQd0qFHcu3 X-Proofpoint-GUID: T1DOLoeOkGT8rpFntV8LIAcQd0qFHcu3 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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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]); Wed, 01 Nov 2023 08:07:15 -0700 (PDT) On 10/8/23 12:47PM, Manas Ghandat wrote: > Currently while copying dtree root from inode to dnode in the xp slot > there is a out of bound memcpy. Added a bound check to the memcpy. > > Reported-by: syzbot+c1056fdfe414463fdb33@syzkaller.appspotmail.com > Fixes: https://syzkaller.appspot.com/bug?extid=c1056fdfe414463fdb33 > Signed-off-by: Manas Ghandat > --- > fs/jfs/jfs_imap.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c > index 799d3837e7c2..d1f897848be0 100644 > --- a/fs/jfs/jfs_imap.c > +++ b/fs/jfs/jfs_imap.c > @@ -746,7 +746,8 @@ int diWrite(tid_t tid, struct inode *ip) > xp = (dtpage_t *) & dp->di_dtroot; > lv = ilinelock->lv; > for (n = 0; n < ilinelock->index; n++, lv++) { > - memcpy(&xp->slot[lv->offset], &p->slot[lv->offset], > + if (lv->offset < 128) I'd use DTPAGEMAXSLOT instead of hard-coding 128. Also, we could at least set rc to -EIO, or we could do something more. Calling jfs_error() would mark the superblock dirty and usually makes the file system read-only until it's fixed. > + memcpy(&xp->slot[lv->offset], &p->slot[lv->offset], > lv->length << L2DTSLOTSIZE); > } > } else {