]> git.hungrycats.org Git - linux/commit
USB: serial: io_edgeport: fix use after free in debug printk
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 31 Oct 2024 09:48:30 +0000 (12:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Nov 2024 13:59:38 +0000 (14:59 +0100)
commite567fc8f7a4460e486e52c9261b1e8b9f5dc42aa
treee4adc0e435c803ebe7e491647c17109bd16dbfd7
parentd76923164705821aa1b01b8d9d1741f20c654ab4
USB: serial: io_edgeport: fix use after free in debug printk

commit 37bb5628379295c1254c113a407cab03a0f4d0b4 upstream.

The "dev_dbg(&urb->dev->dev, ..." which happens after usb_free_urb(urb)
is a use after free of the "urb" pointer.  Store the "dev" pointer at the
start of the function to avoid this issue.

Fixes: 984f68683298 ("USB: serial: io_edgeport.c: remove dbg() usage")
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/io_edgeport.c