Re: [syzbot] [net?] KMSAN: uninit-value in hsr_get_node (3)
From: Jeongjun Park
Date: Fri Apr 19 2024 - 11:52:08 EST
please test uninit-value in hsr_get_node
#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
---
drivers/net/tun.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 0b3f21cba552..5300bbbc617d 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1676,7 +1676,7 @@ static struct sk_buff *tun_build_skb(struct tun_struct *tun,
rcu_read_unlock();
alloc_frag->offset = ALIGN((u64)alloc_frag->offset, SMP_CACHE_BYTES);
- if (unlikely(!skb_page_frag_refill(buflen, alloc_frag, GFP_KERNEL)))
+ if (unlikely(!skb_page_frag_refill(buflen, alloc_frag, GFP_KERNEL | __GFP_ZERO)))
return ERR_PTR(-ENOMEM);
buf = (char *)page_address(alloc_frag->page) + alloc_frag->offset;
--
2.34.1