diff options
author | Oliver Neukum <oneukum@suse.com> | 2024-06-20 13:40:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-20 19:33:22 +0200 |
commit | e587a7633dfee8987a999cf253f7c52a8e09276c (patch) | |
tree | bf72d2ac0cd5eb70f8d9f1681bef63b33a273fa0 /scripts/gdb/linux/vmalloc.py | |
parent | fd80731e5e9d1402cb2f85022a6abf9b1982ec5f (diff) |
usb: gadget: printer: fix races against disable
printer_read() and printer_write() guard against the race
against disable() by checking the dev->interface flag,
which in turn is guarded by a spinlock.
These functions, however, drop the lock on multiple occasions.
This means that the test has to be redone after reacquiring
the lock and before doing IO.
Add the tests.
This also addresses CVE-2024-25741
Fixes: 7f2ca14d2f9b9 ("usb: gadget: function: printer: Interface is disabled and returns error")
Cc: stable <stable@kernel.org>
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Link: https://lore.kernel.org/r/20240620114039.5767-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/gdb/linux/vmalloc.py')
0 files changed, 0 insertions, 0 deletions