CVE-2024-50228

CVE Details

Release Date:2024-11-09

Description


In the Linux kernel, the following vulnerability has been resolved:\nmm: shmem: fix data-race in shmem_getattr()\nI got the following KCSAN report during syzbot testing:\n==================================================================\nBUG: KCSAN: data-race in generic_fillattr / inode_set_ctime_current\nwrite to 0xffff888102eb3260 of 4 bytes by task 6565 on cpu 1:\ninode_set_ctime_to_ts include/linux/fs.h:1638 [inline]\ninode_set_ctime_current+0x169/0x1d0 fs/inode.c:2626\nshmem_mknod+0x117/0x180 mm/shmem.c:3443\nshmem_create+0x34/0x40 mm/shmem.c:3497\nlookup_open fs/namei.c:3578 [inline]\nopen_last_lookups fs/namei.c:3647 [inline]\npath_openat+0xdbc/0x1f00 fs/namei.c:3883\ndo_filp_open+0xf7/0x200 fs/namei.c:3913\ndo_sys_openat2+0xab/0x120 fs/open.c:1416\ndo_sys_open fs/open.c:1431 [inline]\n__do_sys_openat fs/open.c:1447 [inline]\n__se_sys_openat fs/open.c:1442 [inline]\n__x64_sys_openat+0xf3/0x120 fs/open.c:1442\nx64_sys_call+0x1025/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:258\ndo_syscall_x64 arch/x86/entry/common.c:52 [inline]\ndo_syscall_64+0x54/0x120 arch/x86/entry/common.c:83\nentry_SYSCALL_64_after_hwframe+0x76/0x7e\nread to 0xffff888102eb3260 of 4 bytes by task 3498 on cpu 0:\ninode_get_ctime_nsec include/linux/fs.h:1623 [inline]\ninode_get_ctime include/linux/fs.h:1629 [inline]\ngeneric_fillattr+0x1dd/0x2f0 fs/stat.c:62\nshmem_getattr+0x17b/0x200 mm/shmem.c:1157\nvfs_getattr_nosec fs/stat.c:166 [inline]\nvfs_getattr+0x19b/0x1e0 fs/stat.c:207\nvfs_statx_path fs/stat.c:251 [inline]\nvfs_statx+0x134/0x2f0 fs/stat.c:315\nvfs_fstatat+0xec/0x110 fs/stat.c:341\n__do_sys_newfstatat fs/stat.c:505 [inline]\n__se_sys_newfstatat+0x58/0x260 fs/stat.c:499\n__x64_sys_newfstatat+0x55/0x70 fs/stat.c:499\nx64_sys_call+0x141f/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:263\ndo_syscall_x64 arch/x86/entry/common.c:52 [inline]\ndo_syscall_64+0x54/0x120 arch/x86/entry/common.c:83\nentry_SYSCALL_64_after_hwframe+0x76/0x7e\nvalue changed: 0x2755ae53 -> 0x27ee44d3\nReported by Kernel Concurrency Sanitizer on:\nCPU: 0 UID: 0 PID: 3498 Comm: udevd Not tainted 6.11.0-rc6-syzkaller-00326-gd1f2d51b711a-dirty #0\nHardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024\n==================================================================\nWhen calling generic_fillattr(), if you don't hold read lock, data-race\nwill occur in inode member variables, which can cause unexpected\nbehavior.\nSince there is no special protection when shmem_getattr() calls\ngeneric_fillattr(), data-race occurs by functions such as shmem_unlink()\nor shmem_mknod(). This can cause unexpected results, so commenting it out\nis not enough.\nTherefore, when calling generic_fillattr() from shmem_getattr(), it is\nappropriate to protect the inode using inode_lock_shared() and\ninode_unlock_shared() to prevent data-race.

See more information about CVE-2024-50228 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: 7.0
Vector String: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Version: 3.1
Attack Vector: Local
Attack Complexity: High
Privileges Required: Low
User Interaction: None
Scope: Unchanged
Confidentiality: High
Integrity: High
Availability: High

Errata information


PlatformErrataRelease Date
Oracle Linux version 7 (kernel-uek)ELSA-2024-128842024-12-16
Oracle Linux version 8 (kernel-uek)ELSA-2024-128842024-12-16
Oracle Linux version 8 (kernel-uek)ELSA-2024-128872024-12-18
Oracle Linux version 9 (kernel-uek)ELSA-2024-128872024-12-18


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

software.hardware.complete