Commit 9b2f5ef
committed
fbcon: Fix OOB access in font allocation
Commit 1a194e6 ("fbcon: fix integer overflow in fbcon_do_set_font")
introduced an out-of-bounds access by storing data and allocation sizes
in the same variable. Restore the old size calculation and use the new
variable 'alloc_size' for the allocation.
Signed-off-by: Thomas Zimmermann <[email protected]>
Fixes: 1a194e6 ("fbcon: fix integer overflow in fbcon_do_set_font")
Reported-by: Jani Nikula <[email protected]>
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15020
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6201
Cc: Samasth Norway Ananda <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: George Kennedy <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Simona Vetter <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: "Ville Syrjälä" <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Qianqiang Liu <[email protected]>
Cc: Shixiong Ou <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: <[email protected]> # v5.9+
Cc: Zsolt Kajtar <[email protected]>
Reviewed-by: Lucas De Marchi <[email protected]>
Reviewed-by: Qianqiang Liu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent 1a194e6 commit 9b2f5ef
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2504 | 2504 | | |
2505 | 2505 | | |
2506 | 2506 | | |
2507 | | - | |
| 2507 | + | |
2508 | 2508 | | |
2509 | 2509 | | |
2510 | 2510 | | |
| |||
2537 | 2537 | | |
2538 | 2538 | | |
2539 | 2539 | | |
2540 | | - | |
| 2540 | + | |
2541 | 2541 | | |
2542 | 2542 | | |
2543 | | - | |
| 2543 | + | |
2544 | 2544 | | |
2545 | 2545 | | |
2546 | 2546 | | |
| |||
0 commit comments