Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2643112rdb; Wed, 4 Oct 2023 07:24:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEapfZHgho7h3DTxz3owhuo/yyZ23Zd5BoMiZ1AK4nNd0fkPecnd0cxPyAz8PROq4Bi5cTm X-Received: by 2002:a05:6a21:a101:b0:157:be16:b6bc with SMTP id aq1-20020a056a21a10100b00157be16b6bcmr2265855pzc.59.1696429445021; Wed, 04 Oct 2023 07:24:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696429445; cv=pass; d=google.com; s=arc-20160816; b=CslqEsyaeuPqsQu8fPt9AR/PwkeMIz1izUiX0dQInZrI+AZOMpBiOcDWQTJxrF1FVd nDe5aNgEd1IkrOtzM21OwpLQEU2Szg97jbpx+OMB/IADcStKI8TmjgEjlIzeMKQns5sw g5qDFAWVio+8LnJXRbXbAjA2+p48cdWOPI0FYxKhVnlHEWbWw/4K0NugmflQ5Yv7q39z c3/y5l6/zS1g+8SvIOd8LElovOwtCbq7Ti/sH8Bs5O/Jftvl0qUU3urQewQx3jkQt/Q6 n0NkpCdlklR41nCLrXZoNuPLiUlxuJtuNJgx6+ZY7ysrkBAfISBYK4EpQG84k/YBMVmc 1kCA== 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=j7vZ4KBo/1ZD2VgbTPdjLEd+fD6bBbzCepVAyBzkbDI=; fh=f/R/6LksfJWZaQ61sjigxaOIqG2Opm54yJju/GCsZFo=; b=xTUWbv6q7zcSE8ma33XKcSGu/2/vw6P9MZL4cTlqsB6GedCuPlsB9EO9JYZCOFHAsK tCDzi+A8GY38EPkV/YC7JP8fzX36fGMH7o3xYvlVJms7vawfYJZl3P1uS3RF+T0WyIo7 kCqDFkkG271tAvIRTJpKhI7GQqdAVTQpl8Du4FISNa5TLfh5Jw0FU9epmbGJoWkY7NPy bf92lYfRu2AumC+wFQcDRBevoi3ql60qg60tZp2EwZb5Ifkj12cikImA/phYBnv1w53m jyGxhJtCRpYFTJMKTe5WYZ00DQhIugjnIF0gBhjGUNZSSHvWSf3Ut1AON665HEDEofyd YqiQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=P7+oWBwe; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=xk4MKpXu; 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.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id u3-20020a056a00158300b0068a5877bfaesi4019360pfk.382.2023.10.04.07.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 07:24:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=P7+oWBwe; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=xk4MKpXu; 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.37 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 snail.vger.email (Postfix) with ESMTP id BB1D380755EB; Wed, 4 Oct 2023 07:24:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233270AbjJDOYD (ORCPT + 99 others); Wed, 4 Oct 2023 10:24:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233098AbjJDOYC (ORCPT ); Wed, 4 Oct 2023 10:24:02 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 606AFBF for ; Wed, 4 Oct 2023 07:23:59 -0700 (PDT) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3948ixCq008667; Wed, 4 Oct 2023 14:23:40 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=j7vZ4KBo/1ZD2VgbTPdjLEd+fD6bBbzCepVAyBzkbDI=; b=P7+oWBweZiUyYNWpYUxhmWbZCsFeUyWby59A8I/wInAn+0zYWW7JrlwXnwFcmqa12+4f L8sow7wgZCRiqqZmitQsuk13eCjxgHdXTb+Ey8kkxf3NuikF9f9JJk90xt0mk8vKqx5r mqPoDeuTM8tFG1pdymnu8UmstRM2F51zaqAqt9VJTuG6gtwLk3ULqZ8o40xwqjSz+ww7 xV0OUfGVZP2HqlDqYOngAb8KRPxNCedUtVFtkwrQV1KdOD6MNxoI9ZrTf52PLE59CEF1 7vl3T7+P1na7OJHdwbPqkyH6Z4NVJP1WXAqXonXLc6ZGPWzQoea/tcrd//XkDUhnMQKg /Q== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3tea92783g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 04 Oct 2023 14:23:40 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 394DBZFB005814; Wed, 4 Oct 2023 14:23:39 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3tea47p9m3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 04 Oct 2023 14:23:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kjXpmI7t3SGt/hqi9GitIzIXi14qSWGsr4YumRC/NOcFOfXk+YB8xOe0KhZda29m6VjBHjGlEYphk+6GeDbhlxq1DwFBwXzN9LlUCY6c0CxYWBOL8f2dYaOQK9ci3gFzHMvb7CemhXxNxYv5g/Uy72hn0e3IL183iGXsNMg0PbztWn0Jv0nv3LL7/9qBTTXv7BSjJX/IoGbBleLTkUR0qtIHgbmEAPyvIoESmtkZXJqz/1y2/jSkIPqNHT+G7whL8fpvTbt1FDKaKcBJa3cspCpoQgml7d/1KaVHS3OCWlEQDIzS6vlnjWIBDYZyUvg+RTTARmag+F5mZK59E267vQ== 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=j7vZ4KBo/1ZD2VgbTPdjLEd+fD6bBbzCepVAyBzkbDI=; b=YxdEgAkwsYgaQ6jjtyXlULyeY8pUxTpGS6omNS+cqU80xNR43Ay/ntnAjws/FoE30Kxd7bdBLmSIUT/+7L6YjVOGdUdDX8l5CPApTTOeOSkMRspVTo7ByMct8PSevG5lhohxZ+e4JyKq8fbXGmgLVPhEeI/eIGUT5wcrg6lj7IjcTCdk8y6+M2NmHtKgxPY9+Jbqgo+pXHTrt7uwlNyWly1p9Ms5KHYbMkioJe7hsQcVHDxRgUZHsWzRL1yYGV+RCgKuP+jurtAiYhunEStQ2y+8CDxkIQ+MKHlmZY/JCXXT42F+hP+qUMvPv4WRnlyns/EYHxcrdhKSUhGEUMdLUA== 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=j7vZ4KBo/1ZD2VgbTPdjLEd+fD6bBbzCepVAyBzkbDI=; b=xk4MKpXu++vRIYxQpjGhpWSZWmOK6xrwEnwvjEGGPjARgr7tbPSu5L+pYQ2U+Ju3XdCd8O+KhFvRZaCzY5t17rkdxUGNUSl43bh990Gz/Pt0sjIfzoEPfsfc2i31utuXVk2BSmmWsbipGbDad5qWeDQ1qocsHmhY0WHdBFrCzro= Received: from MW5PR10MB5738.namprd10.prod.outlook.com (2603:10b6:303:19b::14) by IA0PR10MB7301.namprd10.prod.outlook.com (2603:10b6:208:404::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.31; Wed, 4 Oct 2023 14:23:37 +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; Wed, 4 Oct 2023 14:23:37 +0000 Message-ID: Date: Wed, 4 Oct 2023 09:23:36 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] jfs: fix array-index-out-of-bounds in diAlloc Content-Language: en-US To: Manas Ghandat Cc: Linux-kernel-mentees@lists.linuxfoundation.org, jfs-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org, syzbot+79d792676d8ac050949f@syzkaller.appspotmail.com References: <20231004074040.12233-1-ghandatmanas@gmail.com> From: Dave Kleikamp In-Reply-To: <20231004074040.12233-1-ghandatmanas@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: CH2PR05CA0007.namprd05.prod.outlook.com (2603:10b6:610::20) To MW5PR10MB5738.namprd10.prod.outlook.com (2603:10b6:303:19b::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW5PR10MB5738:EE_|IA0PR10MB7301:EE_ X-MS-Office365-Filtering-Correlation-Id: 9f5da594-426c-4366-6259-08dbc4e57fa4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?utf-8?B?R2x1THN0cUMrWjlUa3VQRWZzaXFkbE1YMU4wa2V3cXRKWllhWkNCazJyVFFU?= =?utf-8?B?UHZYNEpDc2xPK3JRWHpNRGt4NlhHKzFuTVMyMFZRSlV5N1hwMmd2RVpUNUg2?= =?utf-8?B?MVJ3VURaWXM2QUhvaXZueGJUZ3JvZGY3a3NkSlU0ajBERHpyTi9nLzF4RjBV?= =?utf-8?B?SmpuRG1qSWpqNU5xMit1bXVMZU9YaVBQMThkckU3WXhhc1NtVWZjZVM1MFZV?= =?utf-8?B?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odTIy?= =?utf-8?B?SWZ1RHBiNCtUc05KZUo0WC9tTHlJRzd4QVVNT1R0Yyt6Sk8rL2hmVURCTnRO?= =?utf-8?B?dGFIQ1RXVmVINkZZYlFGQVQ4RzVCcFZpSGxFY0UyK1JhREk2bXQ0Vno4ak05?= =?utf-8?B?a25WSkw2M3pjSkdNK0x3OGlsKzB0b1VRUGdlZWNVL1FYemtIM2hmUnFYUHFN?= =?utf-8?Q?NDCorJ6U6Ctpc=3D?= 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)(346002)(396003)(39860400002)(376002)(366004)(230922051799003)(1800799009)(451199024)(186009)(64100799003)(26005)(6486002)(6512007)(6506007)(83380400001)(2616005)(966005)(4326008)(5660300002)(2906002)(8676002)(44832011)(66556008)(6916009)(316002)(41300700001)(66946007)(8936002)(66476007)(478600001)(31696002)(86362001)(36756003)(38100700002)(31686004)(99710200001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VE14Z0svZ3Z6bHErVjVXbjRRS0k4RU8zZTNrcWN4RS9XL2d4MXdVV2VHNzFJ?= =?utf-8?B?NkNKK3Y3OUd5RGM1Y1BXb0hWUGo1R0lQS0tKVTJsZWk4K3lERnAvcHBYMEJs?= =?utf-8?B?bklBRURrLzJLQ0dHajMrZDRHaGZrTmV5VW1VZ0kyMWc2NngranNTekgyME82?= =?utf-8?B?TGhUa3oxM3crWjdhV1YweEtXK2lHTmNWZmpwa2g0b3cxOXlkaHdjMkhBdkdo?= =?utf-8?B?Z0Q4YW5VTWovZ05ZdjdzYlROSEUwZnlISy9oWTdjaUlLc0JFMGRxVFFZRlZG?= =?utf-8?B?cHEwOG9BR0lVUlhRYWdlZGVwT0k0bzdNQmZ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21aTnVIcFFuRlpwL2dadGlVSVU2N21sSFdmTWprRENMWnFDYjhh?= =?utf-8?B?WHVUdVdHeklKUHBFTENuZy83eDIydVBEVUdNaU5uckxWZExMWmZJekFuRGFW?= =?utf-8?B?RnpjMHBzU0lQWTUvcjM3bG1ETjMyUzlyTnN3T1liTmh6NGh4YzhpMGJKSXRN?= =?utf-8?B?MHRPM25HbjhycW9WNUF1Z0E5ck9CSXphZ3J5WGcxNHFLOHhwZUNNZ0hjOXlL?= =?utf-8?B?STFrQ1d1eTBQS2Y0RmtXSzUvV1oyZjI2ZFQxcjY2QUhRZVZJM1NUQTZNWVkv?= =?utf-8?B?V0IwdzhqTG9Ua05GelJBQmI2NDZTY3Z6WDZVTzVZUlhqY0dON1MzSUtsQlRO?= =?utf-8?B?eGJnZUczVFBjWEU2RG8vZUJVK2VIdk9lUGlnc3pVOWpTTmNEWm14QzhwTDlz?= =?utf-8?B?UzVKSXcvenplSC9tZ3IvZ1FrRm1iWk0vMjg1MEhmb2ljTkd4Ly90aFNEaFI0?= =?utf-8?B?L0ozQU54em1vbFpUZlVOR25lbDhsdkFoT3lYRU9PK0dQR0hYYjJlVmhMWFlT?= =?utf-8?B?OEVacEpTcDU3T0lnK2NBZlR3QmFKL2pxdW0wUFM4NnVqMU9vZjRxYjVRcFIw?= =?utf-8?Q?osfeezO/kqk7Q=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9f5da594-426c-4366-6259-08dbc4e57fa4 X-MS-Exchange-CrossTenant-AuthSource: MW5PR10MB5738.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2023 14:23:37.2317 (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: vyE335OK1s2JJekjjJUO57F5MPbHb41ncR6SsQyPcCFeXnF3qZwXPyGm70dic7kGOw5qx9nKjtU/gJf14HOngn0jN28g74e6RIDoyf/5qWA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR10MB7301 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-04_06,2023-10-02_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 bulkscore=0 adultscore=0 mlxlogscore=999 phishscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310040104 X-Proofpoint-GUID: mFwQzgAitzGw6JAqF5WKUeP0uGL7u3N- X-Proofpoint-ORIG-GUID: mFwQzgAitzGw6JAqF5WKUeP0uGL7u3N- X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 04 Oct 2023 07:24:03 -0700 (PDT) On 10/4/23 2:40AM, Manas Ghandat wrote: > Currently there is not check against the agno of the iag while > allocating new inodes to avoid fragmentation problem. Added the check > which is required. Applied to jfs-next Thanks, Shaggy > > Reported-by: syzbot+79d792676d8ac050949f@syzkaller.appspotmail.com > Closes: https://syzkaller.appspot.com/bug?extid=79d792676d8ac050949f > Signed-off-by: Manas Ghandat > --- > V1 -> V2 : Added check for higher bound of agno > fs/jfs/jfs_imap.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c > index 799d3837e7c2..c0cf74e7392b 100644 > --- a/fs/jfs/jfs_imap.c > +++ b/fs/jfs/jfs_imap.c > @@ -1319,7 +1319,7 @@ diInitInode(struct inode *ip, int iagno, int ino, int extno, struct iag * iagp) > int diAlloc(struct inode *pip, bool dir, struct inode *ip) > { > int rc, ino, iagno, addext, extno, bitno, sword; > - int nwords, rem, i, agno; > + int nwords, rem, i, agno, dn_numag; > u32 mask, inosmap, extsmap; > struct inode *ipimap; > struct metapage *mp; > @@ -1355,6 +1355,9 @@ int diAlloc(struct inode *pip, bool dir, struct inode *ip) > > /* get the ag number of this iag */ > agno = BLKTOAG(JFS_IP(pip)->agstart, JFS_SBI(pip->i_sb)); > + dn_numag = JFS_SBI(pip->i_sb)->bmap->db_numag; > + if (agno < 0 || agno > dn_numag) > + return -EIO; > > if (atomic_read(&JFS_SBI(pip->i_sb)->bmap->db_active[agno])) { > /*