android_kernel_motorola_sm6375/include/uapi
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kees Cook 2072ed7c1a media: uvcvideo: Silence memcpy() run-time false positive warnings
[ Upstream commit b839212988575c701aab4d3d9ca15e44c87e383c ]

The memcpy() in uvc_video_decode_meta() intentionally copies across the
length and flags members and into the trailing buf flexible array.
Split the copy so that the compiler can better reason about (the lack
of) buffer overflows here. Avoid the run-time false positive warning:

  memcpy: detected field-spanning write (size 12) of single field "&meta->length" at drivers/media/usb/uvc/uvc_video.c:1355 (size 1)

Additionally fix a typo in the documentation for struct uvc_meta_buf.

Reported-by: [email protected]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216810
Signed-off-by: Kees Cook <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2023-03-11 16:44:14 +01:00
..
asm-generic aio: fix use-after-free due to missing POLLFREE handling 2021-12-14 14:49:02 +01:00
drm
linux media: uvcvideo: Silence memcpy() run-time false positive warnings 2023-03-11 16:44:14 +01:00
misc
mtd
rdma
scsi
sound ALSA: seq: fix undefined behavior in bit shift for SNDRV_SEQ_FILTER_USE_EVENT 2023-01-18 11:41:04 +01:00
video
xen
Kbuild