CyberSecBulletin
CVE-2022-21546NVD status: Modified

Linux: NULL Pointer Dereference

CVE-2022-21546 is a high-severity NULL pointer dereference vulnerability in Linux, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists versions 54e57be2573cf0b8bf650375fd8752987b6c3d3b, d8e6a27e9238dd294d6f2f401655f300dca20899, 4226622647e3e5ac06d3ebc1605b917446157510 as the first without the flaw, so updating Linux to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.46% chance of exploitation within 30 days, which is low compared with other CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to 54e57be2573cf0b8bf650375fd8752987b6c3d3b or d8e6a27e9238dd294d6f2f401655f300dca20899 or 4226622647e3e5ac06d3ebc1605b917446157510 or ccd3f449052449a917a3e577d8ba0368f43b8f29, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 5.4.294 or 5.10.238 or 5.15.182 or 5.19, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinuxf6970ad31d42fceb38b5595cbad093a4d0bfcc43 up to, but not including, 54e57be2573cf0b8bf650375fd8752987b6c3d3b; f6970ad31d42fceb38b5595cbad093a4d0bfcc43 up to, but not including, d8e6a27e9238dd294d6f2f401655f300dca20899; f6970ad31d42fceb38b5595cbad093a4d0bfcc43 up to, but not including, 4226622647e3e5ac06d3ebc1605b917446157510; f6970ad31d42fceb38b5595cbad093a4d0bfcc43 up to, but not including, ccd3f449052449a917a3e577d8ba0368f43b8f29; 3.854e57be2573cf0b8bf650375fd8752987b6c3d3b, d8e6a27e9238dd294d6f2f401655f300dca20899, 4226622647e3e5ac06d3ebc1605b917446157510, ccd3f449052449a917a3e577d8ba0368f43b8f29
LinuxLinux Kernelbefore 5.4.294; 5.5 up to, but not including, 5.10.238; 5.11 up to, but not including, 5.15.182; 5.16 up to, but not including, 5.19; 5.195.4.294, 5.10.238, 5.15.182, 5.19
DebianDebian Linux11.0Not stated

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
LocalThe attacker needs local access or must trick a user into running something.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
LowA basic user account is enough.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.17.5HighCNA
CVSS 3.17.8HighNVD

Official description

In the Linux kernel, the following vulnerability has been resolved: scsi: target: Fix WRITE_SAME No Data Buffer crash In newer version of the SBC specs, we have a NDOB bit that indicates there is no data buffer that gets written out. If this bit is set using commands like "sg_write_same --ndob" we will crash in target_core_iblock/file's execute_write_same handlers when we go to access the se_cmd->t_data_sg because its NULL. This patch adds a check for the NDOB bit in the common WRITE SAME code because we don't support it. And, it adds a check for zero SG elements in each handler in case the initiator tries to send a normal WRITE SAME with no data buffer.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: NULL Pointer Dereference

The product dereferences a pointer that it expects to be valid but is NULL.

How developers prevent this class of flaw

  • For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished.
  • Select a programming language that is not susceptible to these issues.
  • Check the results of all functions that return a value and verify that the value is non-null before acting upon it.

More NULL Pointer Dereference vulnerabilities (CWE-476)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
  3. Record last changed materially (score, affected products, status or references).

References

Recent NULL Pointer Dereference vulnerabilities

Spotted an error? Tell us.