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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 19 Nov 2013 13:11:21 -0800
From:	Anton Vorontsov <anton@...msg.org>
To:	Shuah Khan <shuah.kh@...sung.com>
Cc:	len.brown@...el.com, pavel@....cz, rjw@...ysocki.net,
	gregkh@...uxfoundation.org, dwmw2@...radead.org,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	shuahkhan@...il.com
Subject: Re: [PATCH 0/2] power_supply: Fix Oops from NULL pointer dereference
 from wakeup_source_activate

On Tue, Nov 19, 2013 at 08:59:34AM -0700, Shuah Khan wrote:
> power_supply_register() calls device_init_wakeup() to register a wakeup
> source before initializing dev_name. As a result, device_wakeup_enable()
> end up registering wakeup source with a null name when wakeup_source_register()
> gets called with dev_name(dev) which is null at the time.
> 
> device_wakeup_enable() uses dev_name(dev) as the wakeup source name.
> When it gets called with a device with its name not yet set, ws structure
> with ws->name = NULL gets created.
> 
> When kernel is booted with wakeup_source_activate enabled, it will panic
> when the trace point code tries to dereferences ws->name.
> 
> This patch series fixes power_supply_register() to initialize the device name
> prior to calling device_init_wakeup() and adds WARN_ON on null device name to
> device_wakeup_enable() to detect driver bugs that result in calling
> device_wakeup_enable() before device is fully initialized with its name in
> device_wakeup_enable().
> 
> It is important that these two fixes to be pulled in together as a series. The
> change to add WARN_ON on null device name without the power_supply_register()
> fix will result in early boot panics when AC Adapter and Battery device drivers
> try to register wakeup source.

I am all for it, so for the power_supply part:

Acked-by: Anton Vorontsov <anton@...msg.org>
--
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