[Bug] musl __pthread_exit thread-list use-after-free under concurrent thread exit (RT-Thread Smart, SMP)
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- c
調査の方向性
Read the attached report and inspect musl's __tl_lock/__tl_sync synchronization and thread-list unlinking in __pthread_exit. Reproduce with the attached tl_race.c command (./tl_race 1000 8) on RT-Thread Smart with SMP and AArch64, then trace the lock behavior during concurrent exits. Done means concurrent create/exit no longer corrupts the thread list or crashes.
索引モデルが issue の本文から書いたものです。
説明
RT-Thread Version
5.2.2
Affected area
RT-Smart
Hardware/BSP vendor
Not applicable / Other
Architecture
ARM / AArch64
Board and hardware details
N/A
Develop Toolchain
GCC
Describe the bug
Concurrent pthread_create/exit crashes user processes on RT-Thread Smart 5.2.2 (SMP, aarch64, musl 1.2.5) inside musl_pthread_exit:
thread-list unlink writes to a thread descriptor already freed/unmapped (Data Abort), or a thread's return address is corrupted to 0 (Instruction Abort). Root cause: the futex-based __tl_lock/__tl_sync fails to provide mutual exclusion for musl's thread-list under concurrent exit on SMP, corrupting the doubly-linked list – entirely user-space, kernel futex is structurally correct.
(tl_race.c, attached): ./tl_race 1000 8 crashes after a few hundred rounds. Details in the attached report.
musl pthread_exit thread-list UAF.md
Other additional context
No response
- 主要言語
- C
- スター
- 12.4k
- フォーク
- 5.5k
- 平均マージ
- 3日 7時間
- マージ済み PR(30日)
- 79
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RT-Thread/rt-thread のほかの issue
-
Arch: ARM/AArch64 Doc
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
RT-Thread/rt-thread#12082 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
RT-Thread/rt-thread#11951 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
[Bug] [libc] timer_gettime 拆秒前将总纳秒截断为 uint32_t,剩余时间查询错误再び着手できるかも @Yunlk が 28 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンin progress
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
RT-Thread/rt-thread#11924 · コメント 7 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
[Bug] dfs_v2 tmpfs: ftruncate(fd, 0) frees the file buffer but reports success — use-after-free read/write and double free from a legal POSIX call対応中かも @remukisama が 33 日前に担当しました。 オープンin progress
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
RT-Thread/rt-thread#11902 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
[bsp][stm32][bluepill] README「快速上手」缺少重新生成 MDK 工程这一步,按文档操作无法编译通过再び着手できるかも @moment-NEW が 50 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンin progress
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
RT-Thread/rt-thread#11818 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
RT-Thread/rt-thread の issue をすべて見る
似ている issue
-
Builder: a structure opened without calculation data shows the Diffraction (fibre) view by defaultオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
FriendsofECCE/ECCE#1245 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/nuttx-apps#4108 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
VirtualBox/virtualbox#996 ·
メンテナーはふだん 6 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
trezor/trezor-firmware#8357 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信