aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorSakari Ailus <[email protected]>2016-04-03 19:31:03 +0000
committerMauro Carvalho Chehab <[email protected]>2016-04-13 19:20:01 +0000
commit2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab (patch)
tree78e2a25eed9562278421f656904ebe8f30eff863 /fs/btrfs/dev-replace.c
parent[media] videobuf2-core: Check user space planes array in dqbuf (diff)
downloadkernel-2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab.tar.gz
kernel-2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab.zip
[media] videobuf2-v4l2: Verify planes array in buffer dequeueing
When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer which will be dequeued is not known until the buffer has been removed from the queue. The number of planes is specific to a buffer, not to the queue. This does lead to the situation where multi-plane buffers may be requested and queued with n planes, but VIDIOC_DQBUF IOCTL may be passed an argument struct with fewer planes. __fill_v4l2_buffer() however uses the number of planes from the dequeued videobuf2 buffer, overwriting kernel memory (the m.planes array allocated in video_usercopy() in v4l2-ioctl.c) if the user provided fewer planes than the dequeued buffer had. Oops! Fixes: b0e0e1f83de3 ("[media] media: videobuf2: Prepare to divide videobuf2") Signed-off-by: Sakari Ailus <[email protected]> Acked-by: Hans Verkuil <[email protected]> Cc: [email protected] # for v4.4 and later Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions