| Titre | RT-Thread RT-Thread Smart 5.0.0 through 5.3.0; master before commit 7b0edb49799630b56aec5c24d639ff530ebcf1a8 Memory Corruption |
|---|
| Description | Summary:
The RT-Thread Smart pipe driver writes the result of the FIONREAD and FIONWRITE ioctl operations directly through the caller-supplied pointer without verifying that the pointer belongs to userspace. An unprivileged local process can supply a kernel address and cause a constrained four-byte kernel memory write.
Affected component:
components/drivers/ipc/pipe.c
Function pipe_fops_ioctl().
Technical details:
The ioctl argument from the RT-Smart user process reaches pipe_fops_ioctl without copyout validation. The handler writes the pipe ring-buffer data length or free-space length through the supplied int pointer. The written value is constrained to the pipe capacity, but the destination address is controlled by the attacker. The issue was reproduced on a 32-bit ARMv7-A RT-Smart build by directing the write to a kernel function pointer.
Impact:
An unprivileged local attacker can corrupt selected kernel memory with a pipe-derived value. This can cause denial of service and may enable kernel privilege escalation depending on the targeted kernel data.
Attack requirements:
The attacker must be able to execute an unprivileged RT-Smart process in a build with POSIX pipe support. No race condition, special mount, or device cooperation is required.
Weakness:
CWE-787 Out-of-bounds Write
CWE-668 Exposure of Resource to Wrong Sphere
CVSS 3.1:
7.1 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Fix:
Commit 7b0edb49799630b56aec5c24d639ff530ebcf1a8 computes the ioctl result in a local variable and copies it to userspace with lwp_put_to_user when the MMU is enabled. No numbered fixed release was identified when this report was prepared. Affected users should update to a release containing this commit or backport the patch.
Public disclosure:
The vulnerability was publicly reported in the RT-Thread GitHub issue tracker on 2026-10-30. The upstream fix was merged on 2026-11-05.
References:
https://github.com/RT-Thread/rt-thread/issues/11958
https://github.com/RT-Thread/rt-thread/pull/11971
https://github.com/RT-Thread/rt-thread/commit/7b0edb49799630b56aec5c24d639ff530ebcf1a8
Reporter:
XueDugu (https://github.com/XueDugu)
|
|---|
| La source | ⚠️ https://github.com/RT-Thread/rt-thread/issues/11958 |
|---|
| Utilisateur | BenSmith (UID 102206) |
|---|
| Soumission | 05/11/2026 06:50 (il y a 24 jours) |
|---|
| Modérer | 28/11/2026 22:15 (24 days later) |
|---|
| Statut | Accepté |
|---|
| Entrée VulDB | 445137 [RT-Thread jusqu’à 5.3.0 POSIX Pipe IPC Driver pipe.c pipe_fops_ioctl buffer overflow] |
|---|
| Points | 20 |
|---|