Re: [syzbot] Re: [syzbot] [v9fs?] WARNING in __alloc_frozen_pages_noprof
From: syzbot
Date: Wed Dec 11 2024 - 16:04:28 EST
For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx.
***
Subject: Re: [syzbot] [v9fs?] WARNING in __alloc_frozen_pages_noprof
Author: leocstone@xxxxxxxxx
#syz test
diff --git a/fs/9p/acl.c b/fs/9p/acl.c
index eed551d8555f..1b9681d58f8d 100644
--- a/fs/9p/acl.c
+++ b/fs/9p/acl.c
@@ -28,6 +28,8 @@ static struct posix_acl *v9fs_fid_get_acl(struct p9_fid *fid, const char *name)
return ERR_PTR(size);
if (size == 0)
return ERR_PTR(-ENODATA);
+ if (size > KMALLOC_MAX_SIZE)
+ return ERR_PTR(-ERANGE);
value = kzalloc(size, GFP_NOFS);
if (!value)