UBUNTU-CVE-2026-98129: Null Pointer Dereference
In the Linux kernel, the following vulnerability has been resolved: scsi: mpi3mr: Fix NULL pointer dereference in mpi3mrsasportadd() sasportallocnum() can return NULL on memory allocation failure. The return value is passed directly to sasportadd() without a NULL check, which causes a NULL pointer dereference. Additionally, if sasportadd() fails, the allocated port is not freed before jumping to outfail, leaking the sasport structure. Call sasportfree() to properly release it.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In mpi3mr_sas_port_add(), check whether sas_port_alloc_num() returns NULL before passing the result to sas_port_add(), and handle the allocation failure without dereferencing the NULL pointer.
- Compensating control
If sas_port_add() fails, call sas_port_free() before jumping to out_fail to release the allocated sas_port structure.