summaryrefslogtreecommitdiff
path: root/kernel/debug/debug_core.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2026-10-27 17:27:40 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-11-04 14:31:17 +0100
commit1115120f89f5c22bf49f7423cf158a04a474dd93 (patch)
tree79c1b77b9cf13ede076a41789a26e7e2cb262dc6 /kernel/debug/debug_core.c
parentff9de8571f05e8f62f9cbe29f38e0aedda9389cf (diff)
mei: lb: read the MTU once
mei_cldev_mtu() returns 0 if the client is not connected. A link reset disconnects all clients at any time, from the reset work. mei_lb_push_payload_v2() asks for the MTU to allocate the request buffer and asks again for every chunk. If the reset comes in between, chunk_size = min(payload_size - sent_data, 0 - sizeof(*req)); makes the chunk the whole rest of the payload, and the memcpy() behind it writes over the end of the buffer. If the reset comes before the first call, kzalloc(0) returns ZERO_SIZE_PTR, which passes the NULL check and is dereferenced. An MTU not bigger than the request header has the same effect as 0. Read the MTU once and refuse one which leaves no room for payload. If the client has gone, sending the chunk fails. Fixes: 773a43b8627f ("mei: lb: add late binding version 2") Cc: stable <stable@kernel.org> Cc: Alexander Usyskin <alexander.usyskin@intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Acked-by: Alexander Usyskin <alexander.usyskin@intel.com> Link: https://patch.msgid.link/2026102739-boil-startup-145b@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/debug/debug_core.c')
0 files changed, 0 insertions, 0 deletions