CVE-2022-49940
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
18/06/2025
Last modified:
18/06/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
tty: n_gsm: add sanity check for gsm->receive in gsm_receive_buf()<br />
<br />
A null pointer dereference can happen when attempting to access the<br />
"gsm->receive()" function in gsmld_receive_buf(). Currently, the code<br />
assumes that gsm->recieve is only called after MUX activation.<br />
Since the gsmld_receive_buf() function can be accessed without the need to<br />
initialize the MUX, the gsm->receive() function will not be set and a<br />
NULL pointer dereference will occur.<br />
<br />
Fix this by avoiding the call to "gsm->receive()" in case the function is<br />
not initialized by adding a sanity check.<br />
<br />
Call Trace:<br />
<br />
gsmld_receive_buf+0x1c2/0x2f0 drivers/tty/n_gsm.c:2861<br />
tiocsti drivers/tty/tty_io.c:2293 [inline]<br />
tty_ioctl+0xa75/0x15d0 drivers/tty/tty_io.c:2692<br />
vfs_ioctl fs/ioctl.c:51 [inline]<br />
__do_sys_ioctl fs/ioctl.c:870 [inline]<br />
__se_sys_ioctl fs/ioctl.c:856 [inline]<br />
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856<br />
do_syscall_x64 arch/x86/entry/common.c:50 [inline]<br />
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80<br />
entry_SYSCALL_64_after_hwframe+0x63/0xcd