• Johan Hovold's avatar
    USB: iowarrior: fix NULL-deref at probe · 88ee6312
    Johan Hovold authored
    commit b7321e81 upstream.
    
    Make sure to check for the required interrupt-in endpoint to avoid
    dereferencing a NULL-pointer should a malicious device lack such an
    endpoint.
    
    Note that a fairly recent change purported to fix this issue, but added
    an insufficient test on the number of endpoints only, a test which can
    now be removed.
    
    Fixes: 4ec0ef3a ("USB: iowarrior: fix oops with malicious USB descriptors")
    Fixes: 946b960d ("USB: add driver for iowarrior devices.")
    Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
    Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
    88ee6312
iowarrior.c 25.7 KB