Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1441565lqp; Mon, 15 Apr 2024 06:49:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX3WczBXcHnsxV8hONUepyjHqUvmWA3HzCEpl+kZS55ewvvmxJxeE0+zAKZhSCbuV+SiK/UqbFsgb/bdCLbbYoh6l6UHChyI8NssKXKZg== X-Google-Smtp-Source: AGHT+IFfq9jeRpZ8TqQ3RhhVX9MG2+j6fOOqrZDUQl6rlKxtTnRhciQYhQVLbaSXbJFXw2il7NQ5 X-Received: by 2002:a05:6a00:190b:b0:6ea:b818:f499 with SMTP id y11-20020a056a00190b00b006eab818f499mr11304490pfi.19.1713188942008; Mon, 15 Apr 2024 06:49:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713188941; cv=pass; d=google.com; s=arc-20160816; b=hQk3cOFxl3HILki1sdwpaD6h1EUQjy0ZxXffh6LuO5CvlWtQ9LNAiFeQ+Aymzu5l8E 068WgVZk4Hpek2xGt/018uBOxr2jHJR3aRJ3akUZYjb1B3/UzuiYrbECQZpL9o9gieZw yhKB+5xjsn2/1igj4oHmPDyA9KZLAnT3025J4TYiOV9ZrLKrOl6rBv0nWARqyik/VKTf kdMA95oc21Fnc9RIW2JYqgr+nPKYPaCR87hHMrkn+lJQJHstArfjiVOadRU5ZO+fpq3N tKENj4LYNdNxM3ZkMRJTU1QmTBP4zl7Nk67R3ApPCLXZxe9juk13dMEUapiGFD6TN0YE Xgmg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=B2Q+QyCzePJOGae2CxQZUXd6ef7zaDXiIcFV+FCC8H4=; fh=qKcTk9bRkHVfzszaVOykQeb19Dv5KFcCkNcdbQZcNWs=; b=nvc9VQzHpYfu98U95Mkr0v5JrsRsHVR1kixHEtY4rTCjR0KXWBwX6cpmtTk1gn/++o qWC0tX3H9NQDSCpBjkX9uF1D30Be0om9sE6xFq+M22LDBZUMsIjL3Sat3t0mibZTc438 2l00YY/9/bxuHWxO9ydl7ojOWF53AmGETvuhnBfSuEF7tvCJv1Mxd5DUGHlHR2znawFI AsuKhiXLDMoFd+H1Tc0BP4nqWjLxnHcSF+VhWJZ0RvLUFuf46LgR5IFyLJPNTu2mugJf f2G6xYlTHBZk6zPjh3idDEue2yH4OW3KB+WHhq9RKvyJa8e0XnSvpTrY2e/6hEsJMpDz MkPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MINR683H; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-145263-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145263-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g11-20020a63520b000000b005f05ef19c3esi7744047pgb.759.2024.04.15.06.49.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 06:49:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145263-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MINR683H; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-145263-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145263-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1C2F628869D for ; Mon, 15 Apr 2024 13:37:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8644971B44; Mon, 15 Apr 2024 13:28:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MINR683H" Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 828BC208B0 for ; Mon, 15 Apr 2024 13:28:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713187715; cv=none; b=QfEpeufCRmElblTCRMJobYo606Wt09FZLyRd3HB9w2xYs9fhLnYOF205/HqNvG9XR34ESkLuzjZQqGrpjg3pTFPAzfZPue/PsLbUMPVosIK44DDOkAGSyWzRDBoIwMbCyXj0fiBw7rovWlJcQjWuo/W0foEfMmInlybEfVhY6Ao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713187715; c=relaxed/simple; bh=U6LCFREtmhAKiNxiTV+c/BEbEz5M9PsN3FdEC6RpvmI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Yw2qSQQv6cuYb1f9eicZ/kw5DQuYvhKdbb4ySVZydDeb9JiqXtUdYqzY1D3w7GZj55gzGiX6uyjUGPdfTu5ItoXUK5VgSPhZBNAu0z9kr5koOuDcHJb/mJxq8aFZDiHrCQ/4IqkAy8NrqSLD357/Qkb31mEhkoVlCFtV2bodvfU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MINR683H; arc=none smtp.client-ip=209.85.210.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-6eced6fd98aso2929913b3a.0 for ; Mon, 15 Apr 2024 06:28:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713187714; x=1713792514; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=B2Q+QyCzePJOGae2CxQZUXd6ef7zaDXiIcFV+FCC8H4=; b=MINR683H31gnYTwttDyvw+JWL/KFt19DSUPIoUhKaIs15A8zUiDYPfYx8Tr/TZ6nTj iY8FbKE5ivans5BfkcfxRC4OIgR1R21rxEDizsyBhjw/p2vGRovB+AwOO/LjUwPfL9Pb NMrkTm6gOTD4sqvVLULKEfrVzfiS0yJPk8WgMnNTTaypA8ePSd44t8p6cs/a1Izebodd Yw2no6jmdOe82fJc4AvaR5kQhrAJi6FaBebQibqLue7E/J+vb9WhcBEAfYhBFjOenzEH /yXZO8Wn/20W9AWg2BjWiwsKFWp2VSD2OgT+1rgbkFQ4jUC730gwcLgJMqxZmiWcamfN zHig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713187714; x=1713792514; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B2Q+QyCzePJOGae2CxQZUXd6ef7zaDXiIcFV+FCC8H4=; b=iNScwwhRzPVOPuzSujsA6vNuzG6xuBVp6UNLPKT9VdNy+pjlcyjDDEGtSH9/4Wl+Rv COT1khvw2g75IyabHHiAPKIJjGPFjSw+Zp28JPPwP3k5T0fjnYRi5ICt3M2pxMKK/+e9 z1G4JpjvLbUbXqIL4V5y+gjLQPGPy+pBmA8ReC/8pDtxkd2VI/uq1Rv75YR4QVep6X5R 8eDuLhS7btP4fqaX4PcP6WUfYe9LFY2EJLDsQGL0JMerS/MZG20oX8C8xRd8w+7Mhpg5 LN5e+vmD8Eb7PJ04c+8KBjBojPtuSmneR9ojcMJWTONhfG/8V86d2XwiACOAtsoNeRc8 rMFA== X-Gm-Message-State: AOJu0Ywu1yEElP3iNGveQ7LenR3+igWF5K0Uz8d172+sqCGPlaPfkkV1 jq6quGInhgtMHJoAqe8uTWkrzyQSX6HgZE9cvBR+is54Y/hv1XX5GFt0sZM6EHc= X-Received: by 2002:a05:6a20:c101:b0:1a7:3d2a:7383 with SMTP id bh1-20020a056a20c10100b001a73d2a7383mr10580421pzb.18.1713187713799; Mon, 15 Apr 2024 06:28:33 -0700 (PDT) Received: from kernelexploit-virtual-machine.localdomain ([121.185.186.233]) by smtp.gmail.com with ESMTPSA id 13-20020a630b0d000000b005f3d2592b5csm7069147pgl.47.2024.04.15.06.28.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 06:28:33 -0700 (PDT) From: Jeongjun Park To: syzbot+2e22057de05b9f3b30d8@syzkaller.appspotmail.com Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [nilfs?] UBSAN: array-index-out-of-bounds in nilfs_add_link Date: Mon, 15 Apr 2024 22:28:28 +0900 Message-Id: <20240415132828.149954-1-aha310510@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <000000000000209c9506161fd1d4@google.com> References: <000000000000209c9506161fd1d4@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit please test array-index-out-of-bounds in nilfs_add_link #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0bbac3facb5d diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c index bc846b904b68..aee40db7a036 100644 --- a/fs/nilfs2/dir.c +++ b/fs/nilfs2/dir.c @@ -240,7 +240,7 @@ nilfs_filetype_table[NILFS_FT_MAX] = { #define S_SHIFT 12 static unsigned char -nilfs_type_by_mode[S_IFMT >> S_SHIFT] = { +nilfs_type_by_mode[(S_IFMT >> S_SHIFT) + 1] = { [S_IFREG >> S_SHIFT] = NILFS_FT_REG_FILE, [S_IFDIR >> S_SHIFT] = NILFS_FT_DIR, [S_IFCHR >> S_SHIFT] = NILFS_FT_CHRDEV, --