]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: streamzap: prevent processing IR data on URB failure
authorMurad Masimov <m.masimov@mt-integration.ru>
Mon, 13 Jan 2025 10:51:31 +0000 (13:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:39:14 +0000 (07:39 +0200)
commit30b46f95f8192f77fbf0dc57aac4e8fbfc0a2e58
treeeeb2484bd81cc3c59b5f8eb9b2738903db3b461d
parent6f567c6a5250e3531cfd9c7ff254ecc2650464fa
media: streamzap: prevent processing IR data on URB failure

commit 549f6d348167fb2f7800ed7c8d4bce9630c74498 upstream.

If streamzap_callback() receives an urb with any non-critical error
status, i.e. any error code other than -ECONNRESET, -ENOENT or -ESHUTDOWN,
it will try to process IR data, ignoring a possible transfer failure.

Make streamzap_callback() process IR data only when urb->status is 0.
Move processing logic to a separate function to make code cleaner and
more similar to the URB completion handlers in other RC drivers.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Fixes: 19770693c354 ("V4L/DVB: staging/lirc: add lirc_streamzap driver")
Cc: stable@vger.kernel.org
Signed-off-by: Murad Masimov <m.masimov@mt-integration.ru>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/rc/streamzap.c