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]
Message-ID: <20251124180522.5350-1-bojanalahithashri@gmail.com>
Date: Mon, 24 Nov 2025 13:05:20 -0500
From: Hithashree Bojanala <bojanalahithashri@...il.com>
To: 
Cc: linux-kernel@...r.kernel.org,
	linux-doc@...r.kernel.org,
	Hithashri Bojanala <bojanalahithashri@...il.com>
Subject: [PATCH]  fix kmalloc bug in bpf_prog_alloc_no_stats

From: Hithashri Bojanala <bojanalahithashri@...il.com>

fix https://syzkaller.appspot.com/bug?extid=d4264133b3e51212ea30
vmalloc doesnt support __GFP_ACCOUNT
---
 kernel/bpf/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index d595fe512498..ffe2658ce165 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -263,7 +263,8 @@ struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size,
 	if (pages <= fp_old->pages)
 		return fp_old;
 
-	fp = __vmalloc(size, gfp_flags);
+	/*vmalloc doesn't support __GFP_ACCOUNT, so strip it for the vmalloc call */
+	fp = __vmalloc(size, gfp_flags & ~__GFP_ACCOUNT);
 	if (fp) {
 		memcpy(fp, fp_old, fp_old->pages * PAGE_SIZE);
 		fp->pages = pages;
-- 
2.47.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ