[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260126114332.23955-1-sohammetha01@gmail.com>
Date: Mon, 26 Jan 2026 17:13:30 +0530
From: Soham Metha <sohammetha01@...il.com>
To: linux-kernel-mentees@...ts.linuxfoundation.org
Cc: shuah@...nel.org,
skhan@...uxfoundation.org,
linux-kernel@...r.kernel.org,
syzbot+619b9ef527f510a57cfc@...kaller.appspotmail.com,
syzkaller-bugs@...glegroups.com,
andrii@...nel.org,
ast@...nel.org,
bpf@...r.kernel.org,
daniel@...earbox.net,
eddyz87@...il.com,
haoluo@...gle.com,
john.fastabend@...il.com,
jolsa@...nel.org,
kpsingh@...nel.org,
martin.lau@...ux.dev,
sdf@...ichev.me,
song@...nel.org,
yonghong.song@...ux.dev,
Soham Metha <sohammetha01@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
Jason Xing <kernelxing@...cent.com>,
Kuniyuki Iwashima <kuniyu@...gle.com>,
Michal Luczaj <mhal@...x.co>,
Mina Almasry <almasrymina@...gle.com>,
Eric Biggers <ebiggers@...gle.com>,
Alexander Lobakin <aleksander.lobakin@...el.com>,
netdev@...r.kernel.org
Subject: [PATCH v2] net: skbuff: fix uninitialized memory use in pskb_expand_head()
pskb_expand_head() allocates a new skb data buffer using
kmalloc_reserve(), which does not initialize memory. skb helpers may
later copy or move padding bytes from the buffer.
Initialize the newly allocated skb buffer to avoid propagating
uninitialized memory.
Reported-by: syzbot+619b9ef527f510a57cfc@...kaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=619b9ef527f510a57cfc
Tested-by: syzbot+619b9ef527f510a57cfc@...kaller.appspotmail.com
Signed-off-by: Soham Metha <sohammetha01@...il.com>
---
v2:
- No code changes
- Resent to netdev list
- Added Closes tag
- Added Tested-by tag
net/core/skbuff.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index a56133902c0d..b0f0d3a0310b 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2282,6 +2282,9 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
data = kmalloc_reserve(&size, gfp_mask, NUMA_NO_NODE, NULL);
if (!data)
goto nodata;
+
+ memset(data, 0, size);
+
size = SKB_WITH_OVERHEAD(size);
/* Copy only real data... and, alas, header. This should be
--
2.34.1
Powered by blists - more mailing lists