Description
In the Linux kernel, the following vulnerability has been resolved: 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.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
773a43b8627f54dca56d08949497014b4ee8878a to < c65d42535c55da7eda785e8fc703a28dc9412958affected773a43b8627f54dca56d08949497014b4ee8878a to < 1115120f89f5c22bf49f7423cf158a04a474dd93affected
Linux Linux
Default version status: affected
7.1affected0 to < 7.1unaffected7.3.7 to ≤ 7.3.*unaffected7.4-rc4 to ≤ *unaffected