Commit 51b8258
fbcon: Fix OOB access in font allocation
commit 9b2f5ef upstream.
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]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 4a4bac8 commit 51b8258
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2492 | 2492 | | |
2493 | 2493 | | |
2494 | 2494 | | |
2495 | | - | |
| 2495 | + | |
2496 | 2496 | | |
2497 | 2497 | | |
2498 | 2498 | | |
| |||
2525 | 2525 | | |
2526 | 2526 | | |
2527 | 2527 | | |
2528 | | - | |
| 2528 | + | |
2529 | 2529 | | |
2530 | 2530 | | |
2531 | | - | |
| 2531 | + | |
2532 | 2532 | | |
2533 | 2533 | | |
2534 | 2534 | | |
| |||
0 commit comments