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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 24 Mar 2014 15:13:54 +0100
From:	Bjorn Van Tilt <bjorn.vantilt@...il.com>
To:	krumboeck@...versalnet.at, wg@...ndegger.com, mkl@...gutronix.de,
	linux-can@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH: 3.11] usb_8dev: Fix memory leak in usb_8dev_start_xmit

Fixed a memory leak when an error occurred in the transmit function.
In the error handling the urb wasn't freed before returning. There was
also a call to the usb_unanchor_urb() function but the urb wasn't
anchored.

Signed-off-by: Bjorn Van Tilt <bjorn.vantilt@...il.com>

---
--- drivers/net/can/usb/usb_8dev.c.orig 2014-03-24 13:40:45.000000000 +0100
+++ drivers/net/can/usb/usb_8dev.c 2014-03-24 13:44:32.076086036 +0100
@@ -698,8 +698,8 @@ static netdev_tx_t usb_8dev_start_xmit(s
  return NETDEV_TX_OK;

 nofreecontext:
- usb_unanchor_urb(urb);
  usb_free_coherent(priv->udev, size, buf, urb->transfer_dma);
+ usb_free_urb(urb);

  netdev_warn(netdev, "couldn't find free context");
--
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