diff options
| author | Tristan Madani <tristan@talencesecurity.com> | 2026-10-19 10:38:49 +0000 |
|---|---|---|
| committer | Johan Hovold <johan@kernel.org> | 2026-10-29 16:07:49 +0100 |
| commit | a3d43b39032cc5565a5693a10c581844342372cd (patch) | |
| tree | e6f3c6cb761193dffe008789dd0bd7e442c74950 /tools/perf/scripts/python/stackcollapse.py | |
| parent | ca783a2d55b3361493917ad4a3573715ba902503 (diff) | |
USB: serial: sierra: validate URB length in instat callback
sierra_instat_callback() reads request fields and one byte past the
usb_ctrlrequest header without first checking that urb->actual_length
is large enough. A short USB interrupt transfer could cause an
out-of-bounds read.
Add two length checks matching the pattern already present in the
option driver (option_instat_callback): one for the request header
before accessing bRequestType, and one for the line-state data byte
inside the serial-state notification handler. Use dev_err() since
failing these checks causes the interrupt URB not to be resubmitted.
Fixes: 033a3fb980b041 ("USB: Sierra Wireless driver update")
Cc: stable@vger.kernel.org
Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
[ johan: use sizeof(*req_pkt) consistently ]
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
