lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sat, 11 Jun 2011 14:21:36 -0700
From:	Connor Hansen <cmdkhh@...il.com>
To:	marcel@...tmann.org
Cc:	padovan@...fusion.mobi, linux-bluetooth@...r.kernel.org,
	linux-kernel@...r.kernel.org, Connor Hansen <cmdkhh@...il.com>
Subject: [PATCH] drivers/bluetooth/bpa10x.c: missing kfrees

both bpa10x_submit_initr_urb() and bpa10x_submit_bulk_urb()
malloc a char buffer(buf) for usb_fill_init_usb() but fail to
free it after freeing the urb.

Likewise, bpa10x_send_frame() allocates a usb_ctrlrequest(dr)
for sending packets but does not free it after the
usb_fill_control_urb() call.

Signed-off-by: Connor Hansen <cmdkhh@...il.com>
---
 drivers/bluetooth/bpa10x.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c
index 751b338..7dfd9ca 100644
--- a/drivers/bluetooth/bpa10x.c
+++ b/drivers/bluetooth/bpa10x.c
@@ -254,6 +254,7 @@ static inline int bpa10x_submit_intr_urb(struct hci_dev *hdev)
 	}
 
 	usb_free_urb(urb);
+	kfree(buf);
 
 	return err;
 }
@@ -295,6 +296,7 @@ static inline int bpa10x_submit_bulk_urb(struct hci_dev *hdev)
 	}
 
 	usb_free_urb(urb);
+	kfree(buf);
 
 	return err;
 }
@@ -393,6 +395,7 @@ static int bpa10x_send_frame(struct sk_buff *skb)
 				skb->data, skb->len, bpa10x_tx_complete, skb);
 
 		hdev->stat.cmd_tx++;
+		kfree(df);
 		break;
 
 	case HCI_ACLDATA_PKT:
-- 
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ