• Johan Hovold's avatar
    USB: console: fix potential use after free · 32a4bf2e
    Johan Hovold authored
    Use tty kref to release the fake tty in usb_console_setup to avoid use
    after free if the underlying serial driver has acquired a reference.
    
    Note that using the tty destructor release_one_tty requires some more
    state to be initialised.
    
    Fixes: 4a90f09b ("tty: usb-serial krefs")
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
    32a4bf2e
console.c 7.27 KB