In the Linux kernel, the following vulnerability has been resolved: Bluetooth: btmtk: fix skb double free on ISO padding failure btmtk_isopkt_pad() uses skb_pad(), which frees the skb on failure. The error is propagated by alloc_mtk_intr_urb() and btusb_send_frame_mtk() up to hci_send_frame(), which frees the skb a second time: err = hdev->send(hdev, skb); if (err < 0) { bt_dev_err(hdev, "sending frame failed (%d)", err); kfree_skb(skb); return err; } Use __skb_put_padto(skb, MTK_ISO_THRESHOLD, false) so that the skb is left to the caller on error. This also replaces the open-coded skb_pad() + __skb_put() sequence.
https://git.kernel.org/stable/c/fb3362324362432d0feec9c8e5129427ded8fc86
https://git.kernel.org/stable/c/fa8d9844e40712fbc18d7d37c4d0faa4e2ade81c
https://git.kernel.org/stable/c/5ec2ca44bf4925b48604aafa90ad153faf0ce45f
https://git.kernel.org/stable/c/491d2212ea0f0f6a3abbd67729df0c6a3ec9c58a