Patch "virtio_console: fix a crash in config_work_handler" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
virtio_console: fix a crash in config_work_handler
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
virtio_console-fix-a-crash-in-config_work_handler.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Jul 3 13:09:11 CEST 2017
From: "G. Campana" <[email protected]>
Date: Thu, 19 Jan 2017 23:37:46 +0200
Subject: virtio_console: fix a crash in config_work_handler
From: "G. Campana" <[email protected]>
[ Upstream commit 8379cadf71c3ee8173a1c6fc1ea7762a9638c047 ]
Using control_work instead of config_work as the 3rd argument to container_of results in an invalid portdev pointer. Indeed, the work structure is initialized as below:
INIT_WORK(&portdev->config_work, &config_work_handler);
It leads to a crash when portdev->vdev is dereferenced later. This bug
is triggered when the guest uses a virtio-console without multiport feature and receives a config_changed virtio interrupt.
--- drivers/char/virtio_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/virtio_console.c +1 -1
@@ -1864,7 +1864,7 @@ static void config_work_handler(struct w {struct ports_device *portdev; - portdev = container_of(work, struct ports_device, control_work); + portdev = container_of(work, struct ports_device, config_work);if (!use_multiport (portdev)) {struct virtio_device *vdev;struct port *port;
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/virtio_console-fix-a-crash-in-config_work_handler.patch