Re: [syzbot] [bluetooth?] KMSAN: uninit-value in hci_rx_work
From: Edward Adam Davis
Date: Mon Oct 07 2024 - 06:54:06 EST
set skb reserve memory to 0.
#syz test
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
index aa6af351d02d..b2e99a83d6c7 100644
--- a/drivers/bluetooth/hci_vhci.c
+++ b/drivers/bluetooth/hci_vhci.c
@@ -492,6 +492,7 @@ static inline ssize_t vhci_get_user(struct vhci_data *data,
kfree_skb(skb);
return -EFAULT;
}
+ memset(skb + len, 0, BT_SKB_RESERVE);
pkt_type = *((__u8 *) skb->data);
skb_pull(skb, 1);