diff options
| author | Mingyu Wang <25181214217@stu.xidian.edu.cn> | 2026-07-21 15:15:22 +0800 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2026-08-10 08:13:26 +0200 |
| commit | 27b8e3c27d858156c6a6b94919d5964fabd40f7a (patch) | |
| tree | dd07508faa989723fa5f43a227df9859f0172744 /tools/perf/scripts/python | |
| parent | 7b5c7bc55e13e7f5ac7b1eaf5c6d690389ea5ee3 (diff) | |
fbdev: core: Clamp total_size to smem_len in read/write functions
Some legacy fbdev drivers may incorrectly set info->screen_size to a
value larger than the actual mapped framebuffer size (info->fix.smem_len)
during mode switches. This could allow out-of-bounds I/O and system
memory accesses in fb_io_read(), fb_io_write(), fb_sys_read(), and
fb_sys_write().
Prevent this by clamping total_size to smem_len when smem_len is non-zero.
Virtual framebuffers (smem_len == 0) are unaffected.
This is a hardening measure; no specific crash is fixed by this patch.
Signed-off-by: Mingyu Wang <25181214217@stu.xidian.edu.cn>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
