Skip to content
Commit 6e7dac9a authored by Thanassis Avgerinos's avatar Thanassis Avgerinos Committed by Hongbo Li
Browse files

firewire: nosy: ensure user_length is taken into account when fetching packet contents

mainline inclusion
from mainline-v6.9-rc7
commit 38762a0763c10c24a4915feee722d7aa6e73eb98
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9OZA3
CVE: CVE-2024-27401

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=38762a0763c10c24a4915feee722d7aa6e73eb98



--------------------------------

Ensure that packet_buffer_get respects the user_length provided. If
the length of the head packet exceeds the user_length, packet_buffer_get
will now return 0 to signify to the user that no data were read
and a larger buffer size is required. Helps prevent user space overflows.

Signed-off-by: default avatarThanassis Avgerinos <thanassis.avgerinos@gmail.com>
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
parent 8ac9764e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment