From patchwork Thu Oct 27 04:43:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryusuke Konishi X-Patchwork-Id: 756 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp27285wru; Wed, 26 Oct 2022 21:43:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7IqQSY4U8uz/MgIS7gUN8UmKLAhjTp1Yvd1ew7RrQpZwJswGVKz4uHAshpQc/NTrqvPXHj X-Received: by 2002:a63:2a44:0:b0:46e:9fda:219b with SMTP id q65-20020a632a44000000b0046e9fda219bmr29651247pgq.347.1666845819951; Wed, 26 Oct 2022 21:43:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666845819; cv=none; d=google.com; s=arc-20160816; b=xzGKdTXUTzh2zdpmhJnxOSjnU79ehNGVXDTxlxT3kzPwDt0nV2ZS8Ay7nzGvDYlxAR 2RBYqOvblE/EEKO/0Tmp5y625rrtskdE1jbLYKsUR3WjlN0ENTDYhpFjzYDItLKVTKwX QpTBIdoiXFRyFkVySSwxhTl2/3REfoqy3d22ZKsFOOs0S4jIWD70oOhAs94F0zMK49iU f/PqaK0kU9TdL1rXkf7O09CKW39cJfh7e0wBJWzxHqCFwDwouZMpWnhJa7YA+NarSs5A DXSWZl5fjiCfCLU/f0C5MLbQqqKgCXI6ghj0L+Y1UWUbkoeYIswtISZR855gz7/MUpQj Y9Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=N0isRSvxKOUKWvo+ShVUDgJ9UCs7Mq+apMEV7CTZEMk=; b=TXTkR+xJmxQ8nOLH8mF4AECfhVtTWTKFa0JoIXA73S2KfcqLVctX2GNa7hm5pLHXkM JDPD4ww99Wo9XevtU/wu20kH6whEPihSZDUuHwRyizVs3dxbR7DgMbMjA6QzUZAARQcW N4jHaHmNJngp5JKIrIon48+Q2wK1IAVO4dc1PSg5DkihVw55DZYwCoGYy8y28Yzohcjv iN3FRp+1K0tqlgiPYrR7Ogrmt4/+iuTLEk60R6+XgnOzOZLthX+SuBNtIvUq/kXEC+Rj +rgjtVOKW+rq6qh7Dexmlq+vY6fOAHozdEXlgfggVXsAmwfciLRMMbcj1Ys5O23VA/i/ GLGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="N2AJ9L/0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ik25-20020a170902ab1900b00179faf5c34asi287005plb.379.2022.10.26.21.43.27; Wed, 26 Oct 2022 21:43:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="N2AJ9L/0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229602AbiJ0EnO (ORCPT + 99 others); Thu, 27 Oct 2022 00:43:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbiJ0EnN (ORCPT ); Thu, 27 Oct 2022 00:43:13 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0494156244; Wed, 26 Oct 2022 21:43:11 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id d9so250345pll.7; Wed, 26 Oct 2022 21:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=N0isRSvxKOUKWvo+ShVUDgJ9UCs7Mq+apMEV7CTZEMk=; b=N2AJ9L/0qCKpQPijTw8x49MBqW2P0RpzCe8819sLrCro+2o24U/vLj05vRH3Q/mWIK uMzgF2KBW+sOJtrHUxHojNiPKvKE14OsrchOSK/EiYNEzNj7xkzR0QYzH8m9XmW+llm7 V+a4NCGC+5B3c0bNLref33ejocHMoHVUbawBLStmL/qxkbAbk85YZKOhcRhFpIibxjOo qmQ387RT1I9h9SD1esWs5cr+c+H1I1L6Ge6taNcWykUfVCcBrq+5RdbV/o1Ssr9/e+oP Eg72UOZMWjax0G+DKrAqLy23+HHYAu5PCAkCfai7Vdixjax/Xm6elFn0qz+A0+eeTyoB sntQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=N0isRSvxKOUKWvo+ShVUDgJ9UCs7Mq+apMEV7CTZEMk=; b=8SHkeBwzlsc3E64M+k94orJts4LwcJ5xVB9IIL0i6Ez6Uka20hEN3Cx517IChHfq5+ Io+hMri809wSB+wXyl5vxYPoivZWG394773N6tB7uUCLjwYOhX4uefSKYQUUdQWLXQwR wHz8AfXVib9YnXxvlnfAPD2mt5mSLlCGnKEdvScvG7v9AUr5uFDt8oJxcfnQfIZhSMQz FHNekjnZeAWCkXqYDt7DyCmHPtIsmXJHl3HUWS5WPRk9lkqm0xJ26vGuK4poWCALqEJl uBI7PGuoDFFD5SA3NkGE7pSZt2oKH2laJ0M7s5YIStBr9uX4/lcISJu/oFss89lQUCJ4 vo6A== X-Gm-Message-State: ACrzQf0urjKKw5NpoclpUyk+cRnNhT7b0Ia5Z6tUITS2okpMtZ4o8yOE zfCpK6Pf+36E9KrNtZ5l21Y= X-Received: by 2002:a17:903:245:b0:178:e0ba:e507 with SMTP id j5-20020a170903024500b00178e0bae507mr49071531plh.115.1666845791170; Wed, 26 Oct 2022 21:43:11 -0700 (PDT) Received: from carrot.. (i220-108-44-211.s42.a014.ap.plala.or.jp. [220.108.44.211]) by smtp.gmail.com with ESMTPSA id m4-20020a170902db0400b00186a2274382sm186929plx.76.2022.10.26.21.43.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 21:43:10 -0700 (PDT) From: Ryusuke Konishi To: Andrew Morton Cc: linux-nilfs , syzbot , syzkaller-bugs@googlegroups.com, LKML Subject: [PATCH 0/2] nilfs2: fix UBSAN shift-out-of-bounds warnings on mount time Date: Thu, 27 Oct 2022 13:43:04 +0900 Message-Id: <20221027044306.42774-1-konishi.ryusuke@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747814522585989134?= X-GMAIL-MSGID: =?utf-8?q?1747814522585989134?= Hi Andrew, please apply the following bug fixes to -mm tree: Ryusuke Konishi (2): nilfs2: fix shift-out-of-bounds/overflow in nilfs_sb2_bad_offset() nilfs2: fix shift-out-of-bounds due to too large exponent of block size The first patch fixes a reported bug by syzbot, and the second one fixes the remaining bug of the same kind. Although they are triggered by the same super block data anomaly, I divided it into the above two because the details of the issues and how to fix it are different. Both are required to eliminate the shift-out-of-bounds issues on mount time. Thanks, Ryusuke Konishi fs/nilfs2/the_nilfs.c | 73 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 65 insertions(+), 8 deletions(-)