lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri,  2 Feb 2024 15:13:17 +0300
From: Fedor Pchelkin <pchelkin@...ras.ru>
To: Dominique Martinet <asmadeus@...ewreck.org>,
	Christian Schoenebeck <linux_oss@...debyte.com>
Cc: Fedor Pchelkin <pchelkin@...ras.ru>,
	Eric Van Hensbergen <ericvh@...nel.org>,
	Latchesar Ionkov <lucho@...kov.net>,
	Venkateswararao Jujjuri <jvrao@...ux.vnet.ibm.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	v9fs@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	Alexey Khoroshilov <khoroshilov@...ras.ru>,
	lvc-project@...uxtesting.org,
	syzbot+56fdf7f6291d819b9b19@...kaller.appspotmail.com,
	syzbot+a83dc51a78f0f4cf20da@...kaller.appspotmail.com,
	Pavel Skripkin <paskripkin@...il.com>
Subject: [PATCH] fs: 9p: avoid warning during xattr allocation

An invalid server may reply with an xattr size which still fits into
ssize_t but is large enough to cause splat during kzalloc().

Add __GFP_NOWARN flag for the allocation. It seems client side can't do
much more about sanity checking here so it's better to return ENOMEM
silently.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Fixes: 85ff872d3f4a ("fs/9p: Implement POSIX ACL permission checking function")
Reported-by: syzbot+56fdf7f6291d819b9b19@...kaller.appspotmail.com
Closes: https://lore.kernel.org/lkml/000000000000789bcd05c9aa3d5d@google.com/
Reported-by: syzbot+a83dc51a78f0f4cf20da@...kaller.appspotmail.com
Closes: https://lore.kernel.org/lkml/00000000000086a03405eec3a706@google.com/
Suggested-by: Pavel Skripkin <paskripkin@...il.com>
Signed-off-by: Fedor Pchelkin <pchelkin@...ras.ru>
---
 fs/9p/acl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/9p/acl.c b/fs/9p/acl.c
index eed551d8555f..e19a46192d2e 100644
--- a/fs/9p/acl.c
+++ b/fs/9p/acl.c
@@ -29,7 +29,7 @@ static struct posix_acl *v9fs_fid_get_acl(struct p9_fid *fid, const char *name)
 	if (size == 0)
 		return ERR_PTR(-ENODATA);
 
-	value = kzalloc(size, GFP_NOFS);
+	value = kzalloc(size, GFP_NOFS | __GFP_NOWARN);
 	if (!value)
 		return ERR_PTR(-ENOMEM);
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ