CVE-2024-49958

CVE Details

Release Date:2024-10-21

Description


In the Linux kernel, the following vulnerability has been resolved:\nocfs2: reserve space for inline xattr before attaching reflink tree\nOne of our customers reported a crash and a corrupted ocfs2 filesystem. \nThe crash was due to the detection of corruption. Upon troubleshooting,\nthe fsck -fn output showed the below corruption\n[EXTENT_LIST_FREE] Extent list in owner 33080590 claims 230 as the next free chain record,\nbut fsck believes the largest valid value is 227. Clamp the next record value? n\nThe stat output from the debugfs.ocfs2 showed the following corruption\nwhere the 'Next Free Rec:' had overshot the 'Count:' in the root metadata\nblock.\nInode: 33080590 Mode: 0640 Generation: 2619713622 (0x9c25a856)\nFS Generation: 904309833 (0x35e6ac49)\nCRC32: 00000000 ECC: 0000\nType: Regular Attr: 0x0 Flags: Valid\nDynamic Features: (0x16) HasXattr InlineXattr Refcounted\nExtended Attributes Block: 0 Extended Attributes Inline Size: 256\nUser: 0 (root) Group: 0 (root) Size: 281320357888\nLinks: 1 Clusters: 141738\nctime: 0x66911b56 0x316edcb8 -- Fri Jul 12 06:02:30.829349048 2024\natime: 0x66911d6b 0x7f7a28d -- Fri Jul 12 06:11:23.133669517 2024\nmtime: 0x66911b56 0x12ed75d7 -- Fri Jul 12 06:02:30.317552087 2024\ndtime: 0x0 -- Wed Dec 31 17:00:00 1969\nRefcount Block: 2777346\nLast Extblk: 2886943 Orphan Slot: 0\nSub Alloc Slot: 0 Sub Alloc Bit: 14\nTree Depth: 1 Count: 227 Next Free Rec: 230\n## Offset Clusters Block#\n0 0 2310 2776351\n1 2310 2139 2777375\n2 4449 1221 2778399\n3 5670 731 2779423\n4 6401 566 2780447\n....... .... .......\n....... .... .......\nThe issue was in the reflink workfow while reserving space for inline\nxattr. The problematic function is ocfs2_reflink_xattr_inline(). By the\ntime this function is called the reflink tree is already recreated at the\ndestination inode from the source inode. At this point, this function\nreserves space for inline xattrs at the destination inode without even\nchecking if there is space at the root metadata block. It simply reduces\nthe l_count from 243 to 227 thereby making space of 256 bytes for inline\nxattr whereas the inode already has extents beyond this index (in this\ncase up to 230), thereby causing corruption.\nThe fix for this is to reserve space for inline metadata at the destination\ninode before the reflink tree gets recreated. The customer has verified the\nfix.

See more information about CVE-2024-49958 from MITRE CVE dictionary and NIST NVD


NOTE: The following CVSS metrics and score provided are preliminary and subject to review.


CVSS v3 metrics

Base Score: 5.5
Vector String: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Version: 3.1
Attack Vector: Local
Attack Complexity: Low
Privileges Required: Low
User Interaction: None
Scope: Unchanged
Confidentiality: None
Integrity: None
Availability: High

Errata information


PlatformErrataRelease Date
Oracle Linux version 7 (kernel-uek)ELSA-2024-128132024-11-12
Oracle Linux version 7 (kernel-uek)ELSA-2024-128682024-12-06
Oracle Linux version 8 (kernel-uek)ELSA-2024-128132024-11-12


This page is generated automatically and has not been checked for errors or omissions. For clarification or corrections:

software.hardware.complete