Message ID | tencent_C51BB525D6BA72BB25338C9EB41B094B3608@qq.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-13369-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp2993156dyb; Sat, 30 Dec 2023 01:00:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IGmzaIMo0jv3T1CYsz0rDwRvyX7W+crlExXj7YLbOvoTvBU0jXKsPPRiCfwZXWr4fg0YikH X-Received: by 2002:a05:620a:2a13:b0:77f:9626:d230 with SMTP id o19-20020a05620a2a1300b0077f9626d230mr15117470qkp.72.1703926837876; Sat, 30 Dec 2023 01:00:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703926837; cv=none; d=google.com; s=arc-20160816; b=1FJwnpZn7l2Pl0g/7aK40gQ2Ot4gBs0zsQDGgWEACBj6HZ9MWpHANMfTR4vVJIvABh D1JkLlpGHwHrS8KKFuywZiw89szzebg9FlP8mU8cluLc+fBO4tya4V9L9qJvPoRG33kD mGYPtQeEeGHXZ6agEhkDZvLuYlBe/yTrqt6SqiEf0ld74X0s06ej9ebuWrGOlYeXVQR8 iK6ViNZvLCvAvGpoi+fQy85PY79ZwDD9uHzWPg4CK6bqrs00cH5kTBgJwEY6uNqq3uv/ 5KaYYyoaxdtRlAz9K0AmWxPLuoNpMHViLtwqUrkZO04I1Fk998S3rgPEyfkcopyMAijv eZrw== ARC-Message-Signature: i=1; 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:date :subject:cc:to:from:message-id:dkim-signature; bh=JhwbLXrg9xb5P3kWXzS/FhXW8uVTkvP/c+tNkfreaxg=; fh=MtpjQr1GksO56PurQZfIuOKRzCPZVe54jugrZzLR6+k=; b=yDoiGIDg/aIOsSu5FmvNWGgN99u24KYzPjiq+avjaE4zIDVsy8eVnVbTNh+RNDdosV YBEM1pF71TJFA9ME9LkmXXZ/2aR1JmoMSj64vVRoOiBfn8/4Td9nPHk8mn5U2F5Nxt3D NqLYuzY0d4z+tsewJjAiW1vjcSsrv6yy958CoSNyQVfe/vu/sX1oJ3ucab/SVQL+wzmT oqrhIg9elQrA8s2Ol2x+6y2mJI2hc/kLKeesZer1WnPLPnF09JsgxqB6sKFpfvBB965S ScZ0X8sPUjhdY6c2hcOJIRwE8j+pN/0bF7qYPbgKxRTJZFIJjtpQDOBYzKsmop6hFvDO fMnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b=s0aYt+I0; spf=pass (google.com: domain of linux-kernel+bounces-13369-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13369-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=qq.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c1-20020a05620a268100b00781a64efcdesi840158qkp.95.2023.12.30.01.00.37 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Dec 2023 01:00:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13369-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b=s0aYt+I0; spf=pass (google.com: domain of linux-kernel+bounces-13369-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13369-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=qq.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8DF931C20B02 for <ouuuleilei@gmail.com>; Sat, 30 Dec 2023 09:00:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B0EA54419; Sat, 30 Dec 2023 09:00:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b="s0aYt+I0" X-Original-To: linux-kernel@vger.kernel.org Received: from out203-205-221-205.mail.qq.com (out203-205-221-205.mail.qq.com [203.205.221.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7024E23A5; Sat, 30 Dec 2023 09:00:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=qq.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qq.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1703926805; bh=JhwbLXrg9xb5P3kWXzS/FhXW8uVTkvP/c+tNkfreaxg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=s0aYt+I01HVG4w0djuk1tDqHKHtrcyh4mERzbmQZkyYFxJ6ntiFYmSxkNMxhlM6xx DOMyQ0BSWfjco7CLbEKjz58v559wg2XTdDct2g5WasZDMooZYuLPBsSqMzi6opeSbt 3TiXnBlisrOWHZZEYjyc/fP+gyQLYxFeT01aqjA8= Received: from pek-lxu-l1.wrs.com ([111.198.225.215]) by newxmesmtplogicsvrsza10-0.qq.com (NewEsmtp) with SMTP id 31FA94; Sat, 30 Dec 2023 17:00:03 +0800 X-QQ-mid: xmsmtpt1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RINFO: Nq+8W0+stu50PRdwbJxPCL0= From: Edward Adam Davis <eadavis@qq.com> To: syzbot+65e940cfb8f99a97aca7@syzkaller.appspotmail.com Cc: almaz.alexandrovich@paragon-software.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, ntfs3@lists.linux.dev, syzkaller-bugs@googlegroups.com Subject: [PATCH arm64] ntfs3: fix oob in ntfs_listxattr Date: Sat, 30 Dec 2023 17:00:03 +0800 X-OQ-MSGID: <20231230090002.2305989-2-eadavis@qq.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <00000000000038cf2f060d7170a9@google.com> References: <00000000000038cf2f060d7170a9@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786696787887509872 X-GMAIL-MSGID: 1786696787887509872 |
Series |
[arm64] ntfs3: fix oob in ntfs_listxattr
|
|
Commit Message
Edward Adam Davis
Dec. 30, 2023, 9 a.m. UTC
The length of name cannot exceed the space occupied by ea.
Reported-and-tested-by: syzbot+65e940cfb8f99a97aca7@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
---
fs/ntfs3/xattr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c index 4274b6f31cfa..3b97508a7bf2 100644 --- a/fs/ntfs3/xattr.c +++ b/fs/ntfs3/xattr.c @@ -219,6 +219,9 @@ static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer, if (!ea->name_len) break; + if (ea->name_len > ea_size) + break; + if (buffer) { /* Check if we can use field ea->name */ if (off + ea_size > size)