fbcon: fix integer overflow in fbcon_do_set_font
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 39b3cffb8cf3111738ea993e2757ab382253d86a · < 4a4bac869560f943edbe3c2b032062f6673b13d3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
fbcon: fix integer overflow in fbcon_do_set_font
Fix integer overflow vulnerabilities in fbcon_do_set_font() where font size calculations could overflow when handling user-controlled font parameters.
The vulnerabilities occur when: 1. CALC_FONTSZ(h, pitch, charcount) performs h * pith * charcount multiplication with user-controlled values that can overflow. 2. FONT_EXTRA_WORDS * sizeof(int) + size addition can also overflow 3. This results in smaller allocations than expected, leading to buffer overflows during font data copying.
Add explicit overflow checking using check_mul_overflow() and check_add_overflow() kernel helpers to safety validate all size calculations before allocation.
From the CVE record · Linux
The Linux kernel’s fbcon_do_set_font() can overflow integer calculations for font sizes when handling user-controlled font parameters. This can cause an undersized allocation and a buffer overflow while copying font data. The input does not specify the access or authentication needed to supply those parameters.
Engineers running the Linux kernel should check whether their kernel includes the fbcon_do_set_font() fix; affected versions are not specified.