Bug 2156927 (CVE-2022-4842)

Summary: CVE-2022-4842 kernel: ntfs3: NULL pointer dereference in attr_punch_hole() in fs/ntfs3/attrib.c
Product: [Other] Security Response Reporter: Alex <allarkin>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, adscvr, airlied, alciregi, bhu, bskeggs, ddepaula, dhoward, dvlasenk, fhrbata, hdegoede, hkrzesin, hpa, jarod, jarodwilson, jfaracco, jferlan, jforbes, jglisse, joe.lawrence, josef, jshortt, jstancek, jwboyer, kcarcia, kernel-maint, kernel-mgr, lgoncalv, linville, lzampier, masami256, mchehab, nmurray, ptalbert, rvrbovsk, scweaver, steved, walters
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Linux kernel 6.2-rc1 Doc Type: If docs needed, set a value
Doc Text:
A NULL pointer dereference flaw was found in the Linux kernel’s NTFS3 driver. This flaw allows a local user to crash the system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-30 10:32:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2154247    

Description Alex 2022-12-29 16:08:29 UTC
In Linux kernel v5.15 and up there is a NULL Pointer Dereference vulnerability in the NTFS3 driver in the function attr_punch_hole() in fs/ntfs3/attrib.c that could be triggered by any user.

The NULL dereference is triggered every time a user tries to punch a hole in a sparse or compressed file.
The vulnerability is indeed exploitable and reproducible.

Environment:

1. An environment with NTFS3 image mounted.
2. NTFS3 image contains a sparse file or a compressed file.

Reproducing:

1. use `fallocate` with the option of `PUNCH_HOLE` (i.e. `fallocate -p -o 0 -l 5 mnt_point/to_punch`).
2. NULL pointer dereference should be triggered.

To summarize, a NULL pointer dereference vulnerability is in the NTFS3 driver, and can be used to create a DoS attack on a Linux machine.

Reference:
https://lore.kernel.org/ntfs3/784f82c4-de71-b8c3-afd6-468869a369af@paragon-software.com/T/#t

Comment 1 Product Security DevOps Team 2022-12-30 10:32:51 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-4842