]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
genirq: Prevent use-after-free and work list corruption
authorPrasad Sodagudi <psodagud@codeaurora.org>
Sun, 24 Mar 2019 14:57:04 +0000 (07:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 May 2019 05:49:54 +0000 (07:49 +0200)
commit1f0f5b3ed6d097676e2a2ec71aed3aeb8a08ac36
tree9ded86390261b659d02829b134cddbd503f28607
parent03bc2652443576da16c63574bc99cb6468339567
genirq: Prevent use-after-free and work list corruption

commit 59c39840f5abf4a71e1810a8da71aaccd6c17d26 upstream.

When irq_set_affinity_notifier() replaces the notifier, then the
reference count on the old notifier is dropped which causes it to be
freed. But nothing ensures that the old notifier is not longer queued
in the work list. If it is queued this results in a use after free and
possibly in work list corruption.

Ensure that the work is canceled before the reference is dropped.

Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: marc.zyngier@arm.com
Link: https://lkml.kernel.org/r/1553439424-6529-1-git-send-email-psodagud@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/irq/manage.c