CVE-2024-50048
Severity CVSS v4.0:
Pending analysis
Type:
CWE-476
NULL Pointer Dereference
Publication date:
21/10/2024
Last modified:
03/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
fbcon: Fix a NULL pointer dereference issue in fbcon_putcs<br />
<br />
syzbot has found a NULL pointer dereference bug in fbcon.<br />
Here is the simplified C reproducer:<br />
<br />
struct param {<br />
uint8_t type;<br />
struct tiocl_selection ts;<br />
};<br />
<br />
int main()<br />
{<br />
struct fb_con2fbmap con2fb;<br />
struct param param;<br />
<br />
int fd = open("/dev/fb1", 0, 0);<br />
<br />
con2fb.console = 0x19;<br />
con2fb.framebuffer = 0;<br />
ioctl(fd, FBIOPUT_CON2FBMAP, &con2fb);<br />
<br />
param.type = 2;<br />
param.ts.xs = 0; param.ts.ys = 0;<br />
param.ts.xe = 0; param.ts.ye = 0;<br />
param.ts.sel_mode = 0;<br />
<br />
int fd1 = open("/dev/tty1", O_RDWR, 0);<br />
ioctl(fd1, TIOCLINUX, &param);<br />
<br />
con2fb.console = 1;<br />
con2fb.framebuffer = 0;<br />
ioctl(fd, FBIOPUT_CON2FBMAP, &con2fb);<br />
<br />
return 0;<br />
}<br />
<br />
After calling ioctl(fd1, TIOCLINUX, &param), the subsequent ioctl(fd, FBIOPUT_CON2FBMAP, &con2fb)<br />
causes the kernel to follow a different execution path:<br />
<br />
set_con2fb_map<br />
-> con2fb_init_display<br />
-> fbcon_set_disp<br />
-> redraw_screen<br />
-> hide_cursor<br />
-> clear_selection<br />
-> highlight<br />
-> invert_screen<br />
-> do_update_region<br />
-> fbcon_putcs<br />
-> ops->putcs<br />
<br />
Since ops->putcs is a NULL pointer, this leads to a kernel panic.<br />
To prevent this, we need to call set_blitting_type() within set_con2fb_map()<br />
to properly initialize ops->putcs.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.1.113 (excluding) | |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.57 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.11.4 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/5b97eebcce1b4f3f07a71f635d6aa3af96c236e7
- https://git.kernel.org/stable/c/8266ae6eafdcd5a3136592445ff4038bbc7ee80e
- https://git.kernel.org/stable/c/e5c2dba62996a3a6eeb34bd248b90fc69c5a6a1b
- https://git.kernel.org/stable/c/f7fb5dda555344529ce584ff7a28b109528d2f1b
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html



