LinuxのLinux Kernelにおける競合状態に関する脆弱性
タイトル LinuxのLinux Kernelにおける競合状態に関する脆弱性
概要

Linuxカーネルにおいて、以下の脆弱性が修正されました:cgroupにおけるタスクの移動とイテレーション間の競合状態の修正です。タスクがcss_setから移動される際、cgroup_migrate_add_task()は最初にlist_move_tail(&task-cg_list, &cset-mg_tasks);を通じてcset-tasksからcset-mg_tasksへタスクを移動します。もしcss_task_iterが現在it-task_posでこのタスクを指している場合、css_set_move_task()はイテレータを有効に保つためcss_task_iter_skip()を呼び出します。しかし、タスクはすでに-mg_tasksへ移動しているため、イテレータは元のtasksリストではなくmg_tasksリストに対して進められてしまいます。その結果、cset-tasks上の残りのタスクやcset-mg_tasksにキューイングされたタスクがイテレーションでスキップされる可能性があります。これを修正するために、task-cg_listをcset-tasksから切り離す前にcss_set_skip_task_iters()を呼び出します。これにより、すべてのアクティブなイテレータがcset-tasks上の次のタスクへ進み、タスクが同時に移動されている場合でもイテレーションを正しく継続できます。この競合は実際には計測なしでは発生しにくいものの、cgroup_procs_show()を人工的に遅延させることで再現可能です。例えばAndroidデバイスでは、一時的に/sys/kernel/cgroup/cgroup_testのノブを追加してcgroup_procs_show()に遅延を注入し、次の手順を行います:1) 3つの長時間実行タスク(PID 101, 102, 103)を生成します。2) テスト用cgroupを作成し、それらのタスクを移動します。3) /sys/kernel/cgroup/cgroup_test経由で大きな遅延を有効化します。4) 1つのシェルでテストcgroupからcgroup.procsを読み取ります。5) 遅延時間内に別のシェルでPID 102を異なるcgroup.procsファイルへ書き込み移動させます。この構成下で、cgroup.procsは断続的にPID 101のみを表示しPID 103をスキップすることがあります。移動が完了すると、再度ファイルを読むと期待通りすべてのタスクが表示されます。なお、この変更ではcss_set_move_task()内の既存のcss_set_skip_task_iters()呼び出しを除去できません。cgroup_migrate_add_task()内の新規呼び出しは、タスクがまだcset-tasks上にある間に移動と競合するイテレータのみを扱います。一方で、タスクがすでにcset-mg_tasksへ移動した後にイテレータが開始される場合もあります。もしcss_set_move_task()からcss_set_skip_task_iters()を削除すると、そのようなイテレータは移動中のタスクを指し続け、css_task_iter_advance()が移動先のcss_set上で誤動作(クラッシュや無限ループを含む)を引き起こす恐れがあります。移動とイテレーションの競合時間は非常に短く、css_task_iterはホットパスではありません。最悪の場合、移動中のプロセスの最初のスレッドにイテレータが位置している際に、cgroup_migrate_add_task()はcss_set_skip_task_iters()を使用して複数のタスクをスキップする必要があります。しかしこれは移動とイテレーションが実際に競合した時のみ発生するため、本修正による性能影響は正当な修正効果に比べて無視できる程度です。

想定される影響 当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 また、当該ソフトウェアが扱う情報について、書き換えは発生しません。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 
対策

リリース情報、またはパッチ情報が公開されています。参考情報を参照して適切な対策を実施してください。

公表日 2026年5月8日0:00
登録日 2026年5月25日10:21
最終更新日 2026年5月25日10:21
CVSS3.0 : 警告
スコア 4.7
ベクター CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
影響を受けるシステム
Linux
Linux Kernel 4.14.138 以上 4.15 未満
Linux Kernel 4.19.66 以上 4.20 未満
Linux Kernel 5.11 以上 5.15.203 未満
Linux Kernel 5.16 以上 6.1.167 未満
Linux Kernel 5.2
Linux Kernel 5.2.1 以上 5.10.253 未満
Linux Kernel 6.13 以上 6.18.19 未満
Linux Kernel 6.19 以上 6.19.9 未満
Linux Kernel 6.2 以上 6.6.130 未満
Linux Kernel 6.7 以上 6.12.78 未満
Linux Kernel 7.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年05月25日]
  掲載
2026年5月25日10:21

NVD脆弱性情報
CVE-2026-43439
概要

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

cgroup: fix race between task migration and iteration

When a task is migrated out of a css_set, cgroup_migrate_add_task()
first moves it from cset->tasks to cset->mg_tasks via:

list_move_tail(&task->cg_list, &cset->mg_tasks);

If a css_task_iter currently has it->task_pos pointing to this task,
css_set_move_task() calls css_task_iter_skip() to keep the iterator
valid. However, since the task has already been moved to ->mg_tasks,
the iterator is advanced relative to the mg_tasks list instead of the
original tasks list. As a result, remaining tasks on cset->tasks, as
well as tasks queued on cset->mg_tasks, can be skipped by iteration.

Fix this by calling css_set_skip_task_iters() before unlinking
task->cg_list from cset->tasks. This advances all active iterators to
the next task on cset->tasks, so iteration continues correctly even
when a task is concurrently being migrated.

This race is hard to hit in practice without instrumentation, but it
can be reproduced by artificially slowing down cgroup_procs_show().
For example, on an Android device a temporary
/sys/kernel/cgroup/cgroup_test knob can be added to inject a delay
into cgroup_procs_show(), and then:

1) Spawn three long-running tasks (PIDs 101, 102, 103).
2) Create a test cgroup and move the tasks into it.
3) Enable a large delay via /sys/kernel/cgroup/cgroup_test.
4) In one shell, read cgroup.procs from the test cgroup.
5) Within the delay window, in another shell migrate PID 102 by
writing it to a different cgroup.procs file.

Under this setup, cgroup.procs can intermittently show only PID 101
while skipping PID 103. Once the migration completes, reading the
file again shows all tasks as expected.

Note that this change does not allow removing the existing
css_set_skip_task_iters() call in css_set_move_task(). The new call
in cgroup_migrate_add_task() only handles iterators that are racing
with migration while the task is still on cset->tasks. Iterators may
also start after the task has been moved to cset->mg_tasks. If we
dropped css_set_skip_task_iters() from css_set_move_task(), such
iterators could keep task_pos pointing to a migrating task, causing
css_task_iter_advance() to malfunction on the destination css_set,
up to and including crashes or infinite loops.

The race window between migration and iteration is very small, and
css_task_iter is not on a hot path. In the worst case, when an
iterator is positioned on the first thread of the migrating process,
cgroup_migrate_add_task() may have to skip multiple tasks via
css_set_skip_task_iters(). However, this only happens when migration
and iteration actually race, so the performance impact is negligible
compared to the correctness fix provided here.

公表日 2026年5月9日0:16
登録日 2026年5月9日4:15
最終更新日 2026年5月12日23:10
関連情報、対策とツール
共通脆弱性一覧