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