]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Bluetooth: 6lowpan: check skb_clone() return value in send_mcast_pkt()
authorZhao Dongdong <zhaodongdong@kylinos.cn>
Tue, 26 May 2026 03:21:39 +0000 (11:21 +0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 27 May 2026 20:44:02 +0000 (16:44 -0400)
commit3c40d381ce04f9575a5d8b542898183c3b4b38dc
tree0a8fd859ef2298f657365e4bc5d135bdf4b4cf3c
parent82855073c1081732656734b74d7d1d5e4cfd0da7
Bluetooth: 6lowpan: check skb_clone() return value in send_mcast_pkt()

The skb_clone() function can return NULL if memory allocation fails.
send_mcast_pkt() calls skb_clone() without checking the return value, which
can lead to a NULL pointer dereference in send_pkt() when it dereferences
skb->data.
Add a NULL check after skb_clone() and skip the peer if the clone fails.

Fixes: 18722c247023 ("Bluetooth: Enable 6LoWPAN support for BT LE devices")
Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/6lowpan.c