CVE-2023-54156
Description
A flaw was identified in the sfc network driver within the Linux kernel where a NULL pointer dereference may occur when reading network statistics during a NIC reset. Specifically, the function efx_net_stats() (used as .ndo_get_stats64 for ethtool) can be invoked while the NIC’s internal data structures have already been torn down. In such a situation, nic_data->mc_stats may be NULL, leading to an unprotected dereference and a kernel crash (BUG) when accessing this pointer. The root cause is the lack of protection against accessing stale or freed data during concurrent operations involving NIC reset and statistics queries.
Statement
A Moderate severity flaw was found in the sfc network driver of the Linux kernel shipped in Red Hat Enterprise Linux 8 and 9. The efx_net_stats() callback (.ndo_get_stats64) can be invoked while the NIC is being reset, for example during an ethtool selftest; at that point the NIC has already been finalized and nic_data->mc_stats is NULL, so reading network statistics dereferences a NULL pointer and crashes the kernel. Triggering the crash requires reading statistics (for example via /proc/net/dev) concurrently with a NIC reset, a hard-to-time race condition whose impact is limited to availability, which is why Red Hat assesses this flaw as Moderate (CVSS 6.4) while the CVE.org record scores it 7.8 (Important). The kernel and kernel-rt packages in Red Hat Enterprise Linux 8 and 9 are affected, and fixes are currently deferred on those streams; the residual risk is a kernel crash (denial of service) on systems using sfc-based network cards when statistics are read during a NIC reset. Red Hat Enterprise Linux 6, 7, and 10, and Red Hat In-Vehicle OS 1.0, are not affected because the vulnerable code is not present in those releases.
Mitigation
To mitigate this issue, prevent the `sfc` kernel module from loading if it is not required for your network hardware. This can be achieved by creating a modprobe configuration file.
Create a file named `/etc/modprobe.d/disable-sfc.conf` with the following content:
install sfc /bin/true
blacklist sfc
After creating the file, regenerate the initramfs and reboot the system for the changes to take effect:
bashThis action may impact network connectivity if your system relies on the `sfc` driver for its network interface card.
dracut -f -v
reboot
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 6.4 | N/A | 7.8 |
| Attack Vector | Network | N/A | Local |
| Attack Complexity | High | N/A | Low |
| Privileges Required | Low | N/A | Low |
| User Interaction | None | N/A | None |
| Scope | Unchanged | N/A | Unchanged |
| Confidentiality | Low | N/A | High |
| Integrity Impact | Low | N/A | High |
| Availability Impact | High | N/A | High |
Vector
Red Hat: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H
cve.org: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Understanding the Weakness (CWE)
Availability
Technical Impact: DoS: Crash, Exit, or Restart
NULL pointer dereferences usually result in the failure of the process unless exception handling (on some platforms) is available and implemented. Even when exception handling is being used, it can still be very difficult to return the software to a safe state of operation.
Integrity,Confidentiality
Technical Impact: Execute Unauthorized Code or Commands; Read Memory; Modify Memory
In rare circumstances, when NULL is equivalent to the 0x0 memory address and privileged code can access it, then writing or reading memory is possible, which may lead to code execution.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.