Skip to contentSkip to conversation

BUG in av7110_vbi_write()

DISCUSSION e9hack 2 participants 3 messages May 13, 2009 – May 14, 2009 Media (V4L/DVB)

lore
Share & tools
lore

e9hack

author
#0 lore raw

Hi,

it seems there is a bug in av7110_vbi_write() (av7110_v4l.c). If an user mode application tries to write more bytes than the size of the structure v4l2_slices_vbi_data, copy_from_user() will overwrite parts of the kernel stack.

Regards,
Hartmut

#1 lore raw
Quoted 5 lines · e9hack wrote:

Hi,

it seems there is a bug in av7110_vbi_write() (av7110_v4l.c). If an user mode application tries to write more bytes than the size of the structure v4l2_slices_vbi_data, copy_from_user() will overwrite parts of the kernel stack.

No, it cannot happen:

|        if (FW_VERSION(av7110->arm_app) < 0x2623 || !av7110->wssMode || count != sizeof d)
|                return -EINVAL;
|        if (copy_from_user(&d, data, count))
|                return -EFAULT;

copy_from_user() will only be called if count == sizeof d.

CU
Oliver

Signature · 3 lines
----------------------------------------------------------------
VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/
----------------------------------------------------------------
author
#2 lore raw
Quoted 1 line · Oliver Endriss

copy_from_user() will only be called if count == sizeof d.

Ooops, I didn't see that.

Regards,
Hartmut