2021-10-18 03:19:17

by Soenke Huster

[permalink] [raw]
Subject: [PATCH] Bluetooth: virtio_bt: fix memory leak in virtbt_rx_handle()

On the reception of packets with a packet type that is not processed by
the virtbt driver, the memory of the allocated socket buffers is never
freed. Add a default case that frees these to avoid a memory leak.

Signed-off-by: Soenke Huster <[email protected]>
---
drivers/bluetooth/virtio_bt.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/bluetooth/virtio_bt.c b/drivers/bluetooth/virtio_bt.c
index 57908ce4fae8..2de0f54ada73 100644
--- a/drivers/bluetooth/virtio_bt.c
+++ b/drivers/bluetooth/virtio_bt.c
@@ -202,6 +202,8 @@ static void virtbt_rx_handle(struct virtio_bluetooth *vbt, struct sk_buff *skb)
hci_skb_pkt_type(skb) = pkt_type;
hci_recv_frame(vbt->hdev, skb);
break;
+ default:
+ kfree_skb(skb);
}
}

--
2.33.1


2021-10-19 00:15:37

by bluez.test.bot

[permalink] [raw]
Subject: RE: Bluetooth: virtio_bt: fix memory leak in virtbt_rx_handle()

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=564589

---Test result---

Test Summary:
CheckPatch PASS 1.68 seconds
GitLint PASS 0.92 seconds
BuildKernel PASS 678.86 seconds
TestRunner: Setup PASS 491.31 seconds
TestRunner: l2cap-tester PASS 10.89 seconds
TestRunner: bnep-tester PASS 5.84 seconds
TestRunner: mgmt-tester PASS 100.55 seconds
TestRunner: rfcomm-tester PASS 7.19 seconds
TestRunner: sco-tester PASS 7.51 seconds
TestRunner: smp-tester PASS 7.19 seconds
TestRunner: userchan-tester PASS 6.11 seconds



---
Regards,
Linux Bluetooth


Attachments:
l2cap-tester.log (43.32 kB)
bnep-tester.log (3.48 kB)
mgmt-tester.log (630.87 kB)
rfcomm-tester.log (11.41 kB)
sco-tester.log (13.60 kB)
smp-tester.log (11.55 kB)
userchan-tester.log (6.22 kB)
Download all attachments