diff options
| author | Sajal Gupta <sajal2005gupta@gmail.com> | 2026-09-02 18:00:57 +0530 |
|---|---|---|
| committer | Ruben Wauters <rubenru09@aol.com> | 2026-09-12 13:56:44 +0100 |
| commit | 59ced288fcba9e91bd38e61a972ad782c4edb7d0 (patch) | |
| tree | 7c0848b3f1ddaaf69b28db3df9f1702f6bc17c1b /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | effce1cb87ee0d8b3a8cbe7722968f4ea7efd360 (diff) | |
| download | linux-next-59ced288fcba9e91bd38e61a972ad782c4edb7d0.tar.gz linux-next-59ced288fcba9e91bd38e61a972ad782c4edb7d0.zip | |
drm/gud: fix out-of-bounds write in gud_plane_atomic_check()
The plane property loop uses req->properties[num_properties + i] as write
index while simultaneously incrementing `num_properties` inside the loop.
At iteration i, num_properties has also incremented by i, so the write
is done at `initial_num_properties + 2*i`, skipping every other index and
advancing by 2 per iteration.
With just 2 connector and 32 plane properties the last write happens at
index 64, one slot past the end of the 64-slot (indices 0–63)
allocation. A USB device can trigger OOB by advertising the maximum
number of properties.
Fix by dropping the redundant `+ i`; num_properties is already the correct
running index, as gud_connector_fill_properties() fills the preceding
slots.
Fixes: 40e1a70b4aed ("drm: Add GUD USB Display driver")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Link: https://sashiko.dev/#/patchset/20260821071812.16500-1-sajal2005gupta%40gmail.com?part=1
Signed-off-by: Sajal Gupta <sajal2005gupta@gmail.com>
Cc: <stable@vger.kernel.org>
Acked-by: Ruben Wauters <rubenru09@aol.com>
Signed-off-by: Ruben Wauters <rubenru09@aol.com>
Link: https://patch.msgid.link/20260902123254.36987-1-sajal2005gupta@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
