LinuxのLinux Kernelにおけるリソースのロックに関する脆弱性
タイトル LinuxのLinux Kernelにおけるリソースのロックに関する脆弱性
概要

Linuxカーネルにおいて、以下の脆弱性が修正されました。x86/shstkにおけるsigreturn中のデッドロックを防止するための対策です。sigreturn中にシャドウスタックのシグナルフレームがポップされ、カーネルはこれを通常の読み取りアクセスでシャドウスタックから読み取ります。メモリがシャドウスタックであると仮定できない場合は、実際のシャドウスタックメモリを読み取っていることを保証するために、mmapの読み取りロックを保持しながらアクセスし、VMAのフラグを確認する追加の手順を踏みます。しかし、この方法は安全とは言えません。シャドウスタックのシグナルフレームの読み取りがページフォルトを引き起こした場合、フォルトハンドラは再帰的に別のmmap読み取りロックを取得しようとします。通常は問題ありませんが、別のCPUの書き込み側が待機している場合には、2回目の読み取りロックが失敗してデッドロックを引き起こす可能性があります。これを修正するために、ユーザ空間への読み取りアクセス中はmmapロックを保持しないようにしました。代わりに、mmapロックを放棄してユーザ空間アクセスを行う間の変更を監視するmmap_lock_speculate_...()を使用し、もし間にmmap書き込みロックが取得されてVMAが変更されている恐れがある場合は再試行します。これらのmmap_lock_speculate_...()ヘルパーはmm::mm_lock_seqを使用しており、これはPER_VMA_LOCKが設定されている場合にのみ利用可能です。そのため、X86_USER_SHADOW_STACKはこれに依存しています。x86ではPER_VMA_LOCKはSMPカーネルのデフォルト設定であるため、SMPでないシャドウスタックユーザベースが存在しないという前提から他の設定のサポートは削除されました。現在、SSPがシャドウスタック上にあると想定できる場合にルックアップ処理をスキップするチェックがありましたが、関数を整理する過程でこの最適化を削除し、複雑なコードフローをより一般化して、このような問題が長期間発見されずに済むことを防止しました。

想定される影響 ・当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 ・当該ソフトウェアが扱う情報について、書き換えは発生しません。 ・当該ソフトウェアが完全に停止する可能性があります。 
対策

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

公表日 2026年5月27日0:00
登録日 2026年6月17日15:39
最終更新日 2026年6月17日15:39
CVSS3.0 : 警告
スコア 5.5
ベクター CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
影響を受けるシステム
Linux
Linux Kernel 6.13 以上 6.18.27 未満
Linux Kernel 6.19 以上 7.0.4 未満
Linux Kernel 6.6 以上 6.6.140 未満
Linux Kernel 6.7 以上 6.12.88 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年06月17日]
  掲載
2026年6月17日15:39

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

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

x86/shstk: Prevent deadlock during shstk sigreturn

During sigreturn the shadow stack signal frame is popped. The kernel does
this by reading the shadow stack using normal read accesses. When it can't
assume the memory is shadow stack, it takes extra steps to makes sure it is
reading actual shadow stack memory and not other normal readable memory. It
does this by holding the mmap read lock while doing the access and checking
the flags of the VMA.

Unfortunately that is not safe. If the read of the shadow stack sigframe
hits a page fault, the fault handler will try to recursively grab another
mmap read lock. This normally works ok, but if a writer on another CPU is
also waiting, the second read lock could fail and cause a deadlock.

Fix this by not holding mmap lock during the read access to userspace.

Instead use mmap_lock_speculate_...() to watch for changes between dropping
mmap lock and the userspace access. Retry if anything grabbed an mmap write
lock in between and could have changed the VMA.

These mmap_lock_speculate_...() helpers use mm::mm_lock_seq, which is only
available when PER_VMA_LOCK is configured. So make X86_USER_SHADOW_STACK
depend on it. On x86, PER_VMA_LOCK is a default configuration for SMP
kernels. So drop support for the other configs under the assumption that
the !SMP shadow stack user base does not exist.

Currently there is a check that skips the lookup work when the SSP can be
assumed to be on a shadow stack. While reorganizing the function, remove
the optimization to make the tricky code flows more common, such that
issues like this cannot escape detection for so long.

公表日 2026年5月27日23:17
登録日 2026年5月28日4:13
最終更新日 2026年5月27日23:48
関連情報、対策とツール
共通脆弱性一覧