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]
Message-Id: <200808022213.07303.oliver.pntr@gmail.com>
Date:	Sat, 2 Aug 2008 22:13:07 +0200
From:	Oliver Pinter <oliver.pntr@...il.com>
To:	Jiri Kosina <jkosina@...e.cz>, stable@...nel.org
Cc:	linux-kernel@...r.kernel.org,
	Juan Marcos Diez Esteban <juan_m_diez@...oo.es>,
	Oliver Pinter <oliver.pntr@...il.com>
Subject: [RFC, 2.6.26.2-rc1] HID: fix memory leak in hidraw_release

>From 4db1c62c9991e62b441672db7f227e722776adc4 Mon Sep 17 00:00:00 2001
From: Jiri Kosina <jkosina@...e.cz>
Date: Tue, 24 Jun 2008 14:45:27 +0200
Subject: [PATCH] HID: fix memory leak in hidraw_release

[ Upstream commit 4db1c62c9991e62b441672db7f227e722776adc4 ]

hidraw_release() forgot to free the linked list structure, causing memory
leak.

Reported-by: Juan Marcos Diez Esteban <juan_m_diez@...oo.es>
Signed-off-by: Jiri Kosina <jkosina@...e.cz>
CC: Oliver Pinter <oliver.pntr@...il.com>

diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index 0c6b4d4..8ecd775 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -211,6 +211,8 @@ static int hidraw_release(struct inode * inode, struct file * file)
 			kfree(list->hidraw);
 	}
 
+	kfree(list);
+
 	return 0;
 }
 
--
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