OESA-2024-2591

Source
https://www.openeuler.org/en/security/security-bulletins/detail/?id=openEuler-SA-2024-2591
Import Source
https://repo.openeuler.org/security/data/osv/OESA-2024-2591.json
JSON Data
https://api.test.osv.dev/v1/vulns/OESA-2024-2591
Upstream
Published
2024-12-27T12:33:06Z
Modified
2025-08-12T05:44:51.241103Z
Summary
kernel security update
Details

The Linux Kernel, the operating system core itself.

Security Fix(es):

In the Linux kernel, the following vulnerability has been resolved:

iouring/io-wq: Use setbit() and test_bit() at worker->flags

Utilize setbit() and testbit() on worker->flags within io_uring/io-wq to address potential data races.

The structure ioworker->flags may be accessed through various data paths, leading to concurrency issues. When KCSAN is enabled, it reveals data races occurring in ioworkerhandlework and iowqactivatefreeworker functions.

 BUG: KCSAN: data-race in io_worker_handle_work / io_wq_activate_free_worker
 write to 0xffff8885c4246404 of 4 bytes by task 49071 on cpu 28:
 io_worker_handle_work (io_uring/io-wq.c:434 io_uring/io-wq.c:569)
 io_wq_worker (io_uring/io-wq.c:?)

<snip>

 read to 0xffff8885c4246404 of 4 bytes by task 49024 on cpu 5:
 io_wq_activate_free_worker (io_uring/io-wq.c:? io_uring/io-wq.c:285)
 io_wq_enqueue (io_uring/io-wq.c:947)
 io_queue_iowq (io_uring/io_uring.c:524)
 io_req_task_submit (io_uring/io_uring.c:1511)
 io_handle_tw_list (io_uring/io_uring.c:1198)

<snip>

Line numbers against commit 18daea77cca6 ("Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm").

These races involve writes and reads to the same memory location by different tasks running on different CPUs. To mitigate this, refactor the code to use atomic operations such as setbit(), testbit(), and clear_bit() instead of basic "and" and "or" operations. This ensures thread-safe manipulation of worker flags.

Also, move create_index to avoid holes in the structure.(CVE-2024-39508)

In the Linux kernel, the following vulnerability has been resolved: smb: client: Fix use-after-free of network namespace. Recently, we got a customer report that CIFS triggers oops while reconnecting to a server. [0] The workload runs on Kubernetes, and some pods mount CIFS servers in non-root network namespaces. The problem rarely happened, but it was always while the pod was dying. The root cause is wrong reference counting for network namespace. CIFS uses kernel sockets, which do not hold refcnt of the netns that the socket belongs to. That means CIFS must ensure the socket is always freed before its netns; otherwise, use-after-free happens. The repro steps are roughly: 1. mount CIFS in a non-root netns 2. drop packets from the netns 3. destroy the netns 4. unmount CIFS We can reproduce the issue quickly with the script [1] below and see the splat [2] if CONFIGNETNSREFCNTTRACKER is enabled. When the socket is TCP, it is hard to guarantee the netns lifetime without holding refcnt due to async timers. Let's hold netns refcnt for each socket as done for SMC in commit 9744d2bf1976 ("smc: Fix use-after-free in tcpwritetimerhandler()."). Note that we need to move putnet() from cifsputtcpsession() to cleandemultiplexinfo(); otherwise, _sockcreate() still could touch a freed netns while cifsd tries to reconnect from cifsdemultiplexthread(). Also, maybegetnet() cannot be put just before _sockcreate() because the code is not under RCU and there is a small chance that the same address happened to be reallocated to another netns. [0]: CIFS: VFS: \XXXXXXXXXXX has not responded in 15 seconds. Reconnecting... CIFS: Serverclose failed 4 times, giving up Unable to handle kernel paging request at virtual address 14de99e461f84a07 Mem abort info: ESR = 0x0000000096000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault Data abort info: ISV = 0, ISS = 0x00000004 CM = 0, WnR = 0 [14de99e461f84a07] address between user and kernel address ranges Internal error: Oops: 0000000096000004 [#1] SMP Modules linked in: clsbpf schingress nlsutf8 cifs cifsarc4 cifsmd4 dnsresolver tcpdiag inetdiag veth xtstate xtconnmark nfconntracknetlink xtnat xtstatistic xtMASQUERADE xtmark xtaddrtype iptREJECT nfrejectipv4 nftchainnat nfnat xtconntrack nfconntrack nfdefragipv6 nfdefragipv4 xtcomment nftcompat nftables nfnetlink overlay nlsascii nlscp437 sunrpc vfat fat aesceblk aescecipher ghashce sm4cecipher sm4 sm3ce sm3 sha3ce sha512ce sha512arm64 sha1ce ena button schfqcodel loop fuse configfs dmisysfs sha2ce sha256arm64 dmmirror dmregionhash dmlog dmmod dax efivarfs CPU: 5 PID: 2690970 Comm: cifsd Not tainted 6.1.103-109.184.amzn2023.aarch64 #1 Hardware name: Amazon EC2 r7g.4xlarge/, BIOS 1.0 11/1/2018 pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : fibruleslookup+0x44/0x238 lr : _fiblookup+0x64/0xbc sp : ffff8000265db790 x29: ffff8000265db790 x28: 0000000000000000 x27: 000000000000bd01 x26: 0000000000000000 x25: ffff000b4baf8000 x24: ffff00047b5e4580 x23: ffff8000265db7e0 x22: 0000000000000000 x21: ffff00047b5e4500 x20: ffff0010e3f694f8 x19: 14de99e461f849f7 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 3f92800abd010002 x11: 0000000000000001 x10: ffff0010e3f69420 x9 : ffff800008a6f294 x8 : 0000000000000000 x7 : 0000000000000006 x6 : 0000000000000000 x5 : 0000000000000001 x4 : ffff001924354280 x3 : ffff8000265db7e0 x2 : 0000000000000000 x1 : ffff0010e3f694f8 x0 : ffff00047b5e4500 Call trace: fibruleslookup+0x44/0x238 _fiblookup+0x64/0xbc iprouteoutputkeyhashrcu+0x2c4/0x398 iprouteoutputkeyhash+0x60/0x8c tcpv4connect+0x290/0x488 _inetstreamconnect+0x108/0x3d0 inetstreamconnect+0x50/0x78 kernelconnect+0x6c/0xac genericipconne ---truncated---(CVE-2024-53095)

Database specific
{
    "severity": "High"
}
References

Affected packages

openEuler:22.03-LTS-SP4 / kernel

Package

Name
kernel
Purl
pkg:rpm/openEuler/kernel&distro=openEuler-22.03-LTS-SP4

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.0-243.0.0.142.oe2203sp4

Ecosystem specific

{
    "src": [
        "kernel-5.10.0-243.0.0.142.oe2203sp4.src.rpm"
    ],
    "x86_64": [
        "bpftool-5.10.0-243.0.0.142.oe2203sp4.x86_64.rpm",
        "bpftool-debuginfo-5.10.0-243.0.0.142.oe2203sp4.x86_64.rpm",
        "kernel-5.10.0-243.0.0.142.oe2203sp4.x86_64.rpm",
        "kernel-debuginfo-5.10.0-243.0.0.142.oe2203sp4.x86_64.rpm",
        "kernel-debugsource-5.10.0-243.0.0.142.oe2203sp4.x86_64.rpm",
        "kernel-devel-5.10.0-243.0.0.142.oe2203sp4.x86_64.rpm",
        "kernel-headers-5.10.0-243.0.0.142.oe2203sp4.x86_64.rpm",
        "kernel-source-5.10.0-243.0.0.142.oe2203sp4.x86_64.rpm",
        "kernel-tools-5.10.0-243.0.0.142.oe2203sp4.x86_64.rpm",
        "kernel-tools-debuginfo-5.10.0-243.0.0.142.oe2203sp4.x86_64.rpm",
        "kernel-tools-devel-5.10.0-243.0.0.142.oe2203sp4.x86_64.rpm",
        "perf-5.10.0-243.0.0.142.oe2203sp4.x86_64.rpm",
        "perf-debuginfo-5.10.0-243.0.0.142.oe2203sp4.x86_64.rpm",
        "python3-perf-5.10.0-243.0.0.142.oe2203sp4.x86_64.rpm",
        "python3-perf-debuginfo-5.10.0-243.0.0.142.oe2203sp4.x86_64.rpm"
    ],
    "aarch64": [
        "bpftool-5.10.0-243.0.0.142.oe2203sp4.aarch64.rpm",
        "bpftool-debuginfo-5.10.0-243.0.0.142.oe2203sp4.aarch64.rpm",
        "kernel-5.10.0-243.0.0.142.oe2203sp4.aarch64.rpm",
        "kernel-debuginfo-5.10.0-243.0.0.142.oe2203sp4.aarch64.rpm",
        "kernel-debugsource-5.10.0-243.0.0.142.oe2203sp4.aarch64.rpm",
        "kernel-devel-5.10.0-243.0.0.142.oe2203sp4.aarch64.rpm",
        "kernel-headers-5.10.0-243.0.0.142.oe2203sp4.aarch64.rpm",
        "kernel-source-5.10.0-243.0.0.142.oe2203sp4.aarch64.rpm",
        "kernel-tools-5.10.0-243.0.0.142.oe2203sp4.aarch64.rpm",
        "kernel-tools-debuginfo-5.10.0-243.0.0.142.oe2203sp4.aarch64.rpm",
        "kernel-tools-devel-5.10.0-243.0.0.142.oe2203sp4.aarch64.rpm",
        "perf-5.10.0-243.0.0.142.oe2203sp4.aarch64.rpm",
        "perf-debuginfo-5.10.0-243.0.0.142.oe2203sp4.aarch64.rpm",
        "python3-perf-5.10.0-243.0.0.142.oe2203sp4.aarch64.rpm",
        "python3-perf-debuginfo-5.10.0-243.0.0.142.oe2203sp4.aarch64.rpm"
    ]
}