ZephyrのRTIO処理に脆弱性、ユーザーモードのスレッドからカーネルメモリに書き込まれるおそれ
概要
Zephyrの RTIO システムコールの検証処理に脆弱性があり、ユーザーモードのスレッドがカーネルメモリへ任意の値を書き込めるおそれがあります。影響を受けるのは3.4.0以上4.3.2未満と4.4.0以上4.5.0未満で、修正版は4.3.2と4.5.0です。権限昇格につながるおそれがあるため、該当する版を使っている場合は修正版への更新を優先してください。
AI要約
SecPulse が外部の生成 AI を使って作った要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。
Zephyrの RTIO システムコールの検証処理に脆弱性があり、ユーザーモードのスレッドがカーネルメモリへ任意の値を書き込めるおそれがあります。影響を受けるのは3.4.0以上4.3.2未満と4.4.0以上4.5.0未満で、修正版は4.3.2と4.5.0です。権限昇格につながるおそれがあるため、該当する版を使っている場合は修正版への更新を優先してください。
影響パッケージ
| パッケージ | 影響を受ける版 → 修正版 | |
|---|---|---|
| zephyrprojectzephyr |
3.4.0 以上 4.3.2 未満→ 4.3.2 4.4.0 以上 4.5.0 未満→ 4.5.0 |
4.3.2 4.5.0 |
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。
Two RTIO syscall verifiers, in subsys/rtio/rtio_syscalls.c (subsys/rtio/rtio_handlers.c before v4.3.0), did not validate user-supplied pointers before the kernel wrote through them.
z_vrfy_rtio_sqe_cancel() performed no validation at all. It passed the caller's struct rtio_sqe pointer straight to z_impl_rtio_sqe_cancel(), which converts it with CONTAINER_OF to a struct rtio_iodev_sqe, ORs RTIO_SQE_CANCELED (BIT(3)) into its 16-bit flags field in supervisor mode, then loads its next pointer and repeats until that pointer is NULL. The syscall takes no RTIO context argument, so it needs no object grant: any user-mode thread on a CONFIG_USERSPACE build can set that bit in a 16-bit word at an address of its choosing in kernel memory, and the kernel continues the write along whatever pointer chain it finds at the corresponding offset. Setting chosen bits in kernel data structures, such as object permission or thread state fields, can be used to escalate privilege from user mode.
z_vrfy_rtio_sqe_copy_in_get_handles() validated its RTIO context and the input SQE array, but only NULL-checked the handle out-parameter before writing a kernel SQE pointer through it, with no K_SYSCALL_MEMORY_WRITE check. A user thread that holds a granted RTIO context can therefore make the kernel store a pointer value at an arbitrary address.
The fixes validate the handle out-parameter as writable, bound the cancel handle to real submission-pool storage, and require permission on the RTIO context that…
出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
参照URL
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- patch github.com
- patch github.com
- patch github.com