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: <6334E09627481B4AA5C8DE1E69E19D3B0875E648@SSLEXCHANGE.solomonsystech.com>
Date:	Sun, 25 May 2008 10:28:06 +0800
From:	<sasin@...omon-systech.com>
To:	<linux-kernel@...r.kernel.org>
Subject: kobject_cleanup should set kobject.k_name to NULL?

Linux 2.6.24

platform_device_unregister -> device_unregister -> put_device ->
kobject_release -> kobject_cleanup frees kobject.k_name but does not set
it to NULL.  

platform_device_register -> device_register -> device_add ->
kobject_set_name which calls kfree on this element.  Calling kfree with
a NULL pointer is harmless, but in this case it is a NON-NULL freed
pointer, causing misbehaviour.

Currently I call device_(un)register combinations multiple times on a
statically allocated platform device structure to simulate hardware
device arrival/removal, and this results in crashes owing to the
behaviour above.  Should this be considered a bug or am I using it
wrong?

Best regards,
Sasi
--
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