Hou Tao

Researcher fromHuawei
#2469of 53,635
99.2Total CVSS
Vulnerabilities · 14
Medium
4
High
9
Critical
1
PT-2024-5424
7.8
2024-06-21
Linux · Linux Kernel · CVE-2024-40899
**Name of the Vulnerable Software and Affected Versions** Linux kernel versions prior to 6.8.0-rc7-dirty #542 **Description** The issue is caused by a slab-use-after-free vulnerability in the `cachefiles ondemand daemon read` function. This occurs when a restore command is issued while the daemon is still alive, resulting in a request being processed multiple times and triggering a use-after-free (UAF) error. The vulnerability can be exploited by issuing a restore command when the daemon is still alive. Technical details about exploitation include: - The `cachefiles ondemand get fd` function is vulnerable to a UAF error. - The `REQ A` variable is used to store a request, and its `done` field is waited on using `wait for completion`. - The `cachefiles ondemand daemon read` function reads data from a file descriptor, and the `copy to user` function is used to copy data to a user-space buffer. - The `xas for each` function is used to iterate over a set of requests, and the `xas set mark` function is used to set a mark on a request. - The `cachefiles ondemand restore` function is used to restore a request, and the `xa erase` function is used to erase a request from a cache. **Recommendations** To resolve the issue, add an additional reference count to `cachefiles req`, which is held while waiting and reading, and then released when the waiting and reading is over. As a temporary workaround, consider disabling the `cachefiles ondemand daemon read` function until a patch is available. Restrict access to the vulnerable `cachefiles ondemand get fd` function to minimize the risk of exploitation. Avoid using the `REQ A` variable in the affected API endpoint until the issue is resolved.
PT-2023-8769
7.8
2023-12-04
Linux · Linux Kernel · CVE-2023-52447
**Name of the Vulnerable Software and Affected Versions** Linux kernel versions from v5.8 to v6.6 **Description** The issue is related to a use-after-free problem in the Linux kernel, specifically in the bpf (Berkeley Packet Filter) subsystem. When updating or deleting an inner map in a map array or map htab, the map may still be accessed by non-sleepable or sleepable programs. The `bpf map fd put ptr()` function decreases the ref-counter of the inner map directly through `bpf map put()`, which can lead to the inner map being freed by `ops->map free()` in a kworker. However, most `.map free()` callbacks do not use `synchronize rcu()` or its variants to wait for the elapse of a RCU (Read-Copy Update) grace period, resulting in a potential use-after-free problem. The estimated number of potentially affected devices worldwide is not specified. There are reports of proof-of-concept (PoC) exploits being released, demonstrating the vulnerability's potential for container escape. **Recommendations** To resolve the issue, update the Linux kernel to a version that includes the fix for the vulnerability. Specifically, versions prior to v5.8 and after v6.6 are not affected. For versions between v5.8 and v6.6, apply the patch that fixes the use-after-free problem in the bpf subsystem. As a temporary workaround, consider disabling the `bpf map put()` function or restricting access to the vulnerable bpf subsystem until a patch is available.