[BUG] WARN in v4l_querycap -- em28xx VBI/video device_caps mismatch (v4l2-ioctl.c:1117)

From: Farhad Alemi

Date: Thu Aug 27 2026 - 23:17:09 EST


Hello,

As part of the kernel research at ASU's SEFCOM
lab, we hit the crash below. Crash reports can be found here:

https://github.com/farhad-alemi/public_bug_reports/tree/main/125-media-em28xx-device_caps-mismatch-v4l_querycap/

(cap->capabilities & (vfd->device_caps | V4L2_CAP_DEVICE_CAPS)) !=
(vfd->device_caps | V4L2_CAP_DEVICE_CAPS)
WARNING: drivers/media/v4l2-core/v4l2-ioctl.c:1119 at
v4l_querycap+0x359/0x4a0 drivers/media/v4l2-core/v4l2-ioctl.c:1117,
CPU#1: v4l_id/26859
Call Trace:
__video_do_ioctl+0xad7/0xc90 drivers/media/v4l2-core/v4l2-ioctl.c:3133
video_usercopy+0x86a/0x1320 drivers/media/v4l2-core/v4l2-ioctl.c:3475
v4l2_ioctl+0x18d/0x1e0 drivers/media/v4l2-core/v4l2-dev.c:366
__se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583

BUG: KASAN: slab-use-after-free in v4l_querycap+0x415/0x4a0
drivers/media/v4l2-core/v4l2-ioctl.c:1112

Our reproducer.c is available upon request.

Happy to test a patch if that would help.

Regards,