Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp581567rdb; Thu, 1 Feb 2024 18:50:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbbg9kAr+HcSJ8tGBDmvFETqQOXSRey9GCndsXVaR/HrKFdI4/pTvLJ0nYOaBc62Fv9WGR X-Received: by 2002:a17:906:857:b0:a31:6534:1da with SMTP id f23-20020a170906085700b00a31653401damr549638ejd.36.1706842205250; Thu, 01 Feb 2024 18:50:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706842205; cv=pass; d=google.com; s=arc-20160816; b=la0tTX1fJzwFCKHCTvc2ltxmHIvqpwJ7C1WCkOPEy8zSBPMLwWAiS5X6ktkVq0YDNm OBz2VnzNiikv34KXLrbhNOZ/2F5hXPDpw8YIVdQwYgYGcm23hJ43TlpfRvNAPy/0BeSD P5okg6UiGSW9m8OittqeQ6aQGKGJbBNHMRQHzWKKAWjAb9gPd5rAt+7uu5j42nQ+vYBf JQUFuhpfBtFB3DjWW4KAeCFtMax8Fu/OZ36c374szZ7sWV/HjNnbrK3HZ1mwdj8uQX9w t/xjzyCDzP8ZQpvvGIlykQkknOr69sIeLV8tWiDoUb9fCmkpGTVkhTNTF4RDiVfcn4FN +XuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:message-id:in-reply-to:date:mime-version :list-unsubscribe:list-subscribe:list-id:precedence; bh=RRZPofN4bcD8oGnDE7lDYHifNn4X+IS4OvVaqHEDSMs=; fh=P2MlrLIpGfJOcpiTROEsnlfNt/l04QJUC9fkcphZun8=; b=w8coN+5nrr31IXzGJLpC4f8Ed40L73S+z5r05K7P2sx18TYb+dO5Y0jGtoTEXLyIBO fqF/IXtbixnGUZqAjo0fND9Nuk1jgNP6Yq9aMfJ27ghwO7WeKAnFtqUhI4i4QxKCrw1A QDPf3fnnx2s6nLWKAiS7RRGv9lzwesBjHp3u15YBoreG73VFheYBk3lRVS4jdLox2Jaw F9gSIOWQ8/YqwiskDPRs7RHPwBbNDio8j3SEBXv57tcHPf8+R1+LQbaNXrrYMgMsrioZ uAzJvCxz37MVaUDKFFz440jsHa/38gHQg3UTiU0sONNwt/wKE/mOVpBfB+qPDA1+hX4b NCGA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.com); spf=pass (google.com: domain of linux-kernel+bounces-49115-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49115-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com X-Forwarded-Encrypted: i=1; AJvYcCUIIfur1XD+8FQeUK6ggnUUbZXdCTjUObDBVyR5FThUgx+Ky3HmweFVzqPbe4FOuv6zj0/Fga1E+rqb7zaG17OKJftXDg600chOp3CtSw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id g13-20020a1709067c4d00b00a3527578043si360334ejp.740.2024.02.01.18.50.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 18:50:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49115-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.com); spf=pass (google.com: domain of linux-kernel+bounces-49115-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49115-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.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 am.mirrors.kernel.org (Postfix) with ESMTPS id B438D1F24E56 for ; Fri, 2 Feb 2024 02:50:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B0A8AE57A; Fri, 2 Feb 2024 02:49:57 +0000 (UTC) Received: from mail-il1-f200.google.com (mail-il1-f200.google.com [209.85.166.200]) (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 C9665E549 for ; Fri, 2 Feb 2024 02:49:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706842197; cv=none; b=ghO2SIG0+vI6BtUubyoHwCTejowc2HisCwdZpRzCmvNEtzvz8Tt5OPm7xdbadHYaSNaN0YKj7aATSgF8xjWCrLEqnBiCdj3zuZ0YwU1sJY+wpuAaiWAcyBjKx/AuqD2XJoTdO1Sd+X9dp9IZLIdVr7J1rNaIM40pmJe1pI4yKXo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706842197; c=relaxed/simple; bh=AUq8Eft6ouqlHqhRqruK5DielG0f+n1wA7wpY1QKcs4=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=MhSYOncUSMSEZjHutSyUVkEtosFx/T9tV1c6xeyaZu3bozp2S6MxFIVz0bPPq/Plpqtl7GfnxVASMj5uqyd7F2DmL+AG3/sGS2i1wW1g684wlkAk3jSHiR44U/ALsSd5OJxamtOhVFHH+sWwWWKhdTTN5w2XpwC6/nb3m1z0tKw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-il1-f200.google.com with SMTP id e9e14a558f8ab-363922a1774so13778325ab.3 for ; Thu, 01 Feb 2024 18:49:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706842195; x=1707446995; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RRZPofN4bcD8oGnDE7lDYHifNn4X+IS4OvVaqHEDSMs=; b=OSFMwhj8X4vW533Vd6+63S5ZEC5aw+tnRMhElfrCOqrzQRMRkdL1lApEEDTTZjvz5q hJPVg8sztGcLjPLeeY9Kf0+4u6YGYLz+6l17bDu1vLhtrrJk9IXwXQksfOxUbvtfTMUu dkK0UMnOfbNIBxxxGMzI2Cjb+QdjLErjmpLAccYcD8YA5byPhRSQVKOByDQCUWpP9cw2 IkzGSkKhmCrmuc82Vmhsny58uT8X3oCJjy/ei5UaEif+BC03POT7dcZ9wTjyZLZPtMNM 704U9VnVf9fdzUrmA4nEpfqLC1TFE/IQJu/1XOjgmohksOdG5SZOjhpX7vw2j28fK2WW rDAQ== X-Gm-Message-State: AOJu0Yz26w3/JhwjmVygYKh3J3HjI2GnMdYKtCR4gHjVVNgkSmCgM1F4 RMB80m48hent+BPbKYUF2Q8vEyayq4QOX2xplkiB1GwRDkSyivr+dfgrT2MsmAYMJaUlOWkgSJV oQqkwpzPqhAvzM69JdJJUyGkHmQWoZ8BRKO34Hq/mQ1+d0+9hnlV8v52AkA== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6e02:1e02:b0:361:a33f:36a4 with SMTP id g2-20020a056e021e0200b00361a33f36a4mr354105ila.2.1706842194925; Thu, 01 Feb 2024 18:49:54 -0800 (PST) Date: Thu, 01 Feb 2024 18:49:54 -0800 In-Reply-To: <00000000000012d4ed0610537e34@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000b7606506105d2a70@google.com> Subject: Re: [syzbot] Re: [syzbot] [ntfs3?] KASAN: slab-out-of-bounds Read in mi_enum_attr From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: Re: [syzbot] [ntfs3?] KASAN: slab-out-of-bounds Read in mi_enum_attr Author: lizhi.xu@windriver.com #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master diff --git a/fs/ntfs3/record.c b/fs/ntfs3/record.c index 53629b1f65e9..a435df98c2b1 100644 --- a/fs/ntfs3/record.c +++ b/fs/ntfs3/record.c @@ -243,14 +243,14 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr) off += asize; } - asize = le32_to_cpu(attr->size); - /* Can we use the first field (attr->type). */ if (off + 8 > used) { static_assert(ALIGN(sizeof(enum ATTR_TYPE), 8) == 8); return NULL; } + asize = le32_to_cpu(attr->size); + if (attr->type == ATTR_END) { /* End of enumeration. */ return NULL;