]> git.ipfire.org Git - people/arne_f/kernel.git/commit
Fix firmware loader uevent buffer NULL pointer dereference
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 9 Jul 2015 18:20:01 +0000 (11:20 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2015 16:29:19 +0000 (09:29 -0700)
commitbf94e2202c008de5ebb87e6f5887aba5b9aa8152
tree7cb725f407bb069145faf91791644dc85b3a7862
parent206f4fba0c512a45a7cc547ca7388a4e2d7c9c03
Fix firmware loader uevent buffer NULL pointer dereference

commit 6f957724b94cb19f5c1c97efd01dd4df8ced323c upstream.

The firmware class uevent function accessed the "fw_priv->buf" buffer
without the proper locking and testing for NULL.  This is an old bug
(looks like it goes back to 2012 and commit 1244691c73b2: "firmware
loader: introduce firmware_buf"), but for some reason it's triggering
only now in 4.2-rc1.

Shuah Khan is trying to bisect what it is that causes this to trigger
more easily, but in the meantime let's just fix the bug since others are
hitting it too (at least Ingo reports having seen it as well).

Reported-and-tested-by: Shuah Khan <shuahkh@osg.samsung.com>
Acked-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/firmware_class.c