製品・ソフトウェアに関する情報
LinuxのLinux Kernelにおける不特定の脆弱性
Title LinuxのLinux Kernelにおける不特定の脆弱性
Summary

Linuxカーネルにおいて、以下の脆弱性が修正されました:ata: libataにおけるdefer_qcをクリアした後に保留中の作業をキャンセルしない問題です。Syzbotはata_scsi_deferred_qc_work()内でWARN_ON()が発生することを報告しました。これはap-ops-qc_defer()が保留中のqcを発行する前にゼロ以外を返すためです。ata_scsi_schedule_deferred_qc()は各コマンド完了時に呼び出され、この関数は保留中のQCがあるかをチェックし、ap-ops-qc_defer()がゼロを返した場合(つまりこの時点で保留なしに保留中QCをキューに入れられる場合)、保留中QCを発行する作業をキューに入れます。作業が実行されるのはスケジュールされた後かなり時間が経ってからであり、その際にap-ops-qc_defer()がゼロ以外を返すとWARN_ON()が発生します。ap-lockはdeferred_qcの割り当てとクリア時に保持され、作業自体もap-lockを保持していますが、現在のコードはdeferred_qcをクリアした後に作業をキャンセルしていません。そのため、以下のシナリオが発生する可能性があります:1) 複数のNCQコマンドがキューに入る。2) 非NCQコマンドがキューに入りap-deferred_qcに保存される。3) 最後のNCQコマンドが完了し、保留中QCを発行する作業がキューに入る。4) タイムアウトやエラーが発生しap-deferred_qcがクリアされるが、キューに入った作業はキャンセルされない。5) ポートがリセットされる。6) 複数のNCQコマンドがキューに入る。7) 非NCQコマンドがキューに入りap-deferred_qcに保存される。8) 作業がついに実行されますが、その時点ではまだNCQコマンドが進行しており、この作業は2)の非NCQコマンドに対応したもので7)のものではありません。作業が実行されてはいけない時に実行されてしまうのは、4)でap-deferred_qcがクリアされた際に作業がキャンセルされなかったためです。したがって、ap-deferred_qcをクリアする際は常に作業をキャンセルすることを保障します。別の対策としてはap-ops-qc_defer()がゼロ以外を返す場合にata_scsi_deferred_qc_work()が何もしないようにする方法もありますが、ap-deferred_qcをクリアする際に確実に作業をキャンセルする方が論理的に適切です。なぜならその時はap-lockを保持しており、作業がlockを保持していないため(作業はlockの取得を待つことはありますがap-deferred_qcが設定されていなければ何もしないため問題ないからです)です。

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

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

Publication Date March 25, 2026, midnight
Registration Date April 27, 2026, 11:27 a.m.
Last Update April 27, 2026, 11:27 a.m.
CVSS3.0 : 警告
Score 5.5
Vector CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Affected System
Linux
Linux Kernel 6.18.14 以上 6.18.18 未満
Linux Kernel 6.19.4 以上 6.19.7 未満
Linux Kernel 7.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
Change Log
No Changed Details Date of change
1 [2026年04月27日]
  掲載
April 27, 2026, 11:27 a.m.

NVD Vulnerability Information
CVE-2026-23355
Summary

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

ata: libata: cancel pending work after clearing deferred_qc

Syzbot reported a WARN_ON() in ata_scsi_deferred_qc_work(), caused by
ap->ops->qc_defer() returning non-zero before issuing the deferred qc.

ata_scsi_schedule_deferred_qc() is called during each command completion.
This function will check if there is a deferred QC, and if
ap->ops->qc_defer() returns zero, meaning that it is possible to queue the
deferred qc at this time (without being deferred), then it will queue the
work which will issue the deferred qc.

Once the work get to run, which can potentially be a very long time after
the work was scheduled, there is a WARN_ON() if ap->ops->qc_defer() returns
non-zero.

While we hold the ap->lock both when assigning and clearing deferred_qc,
and the work itself holds the ap->lock, the code currently does not cancel
the work after clearing the deferred qc.

This means that the following scenario can happen:
1) One or several NCQ commands are queued.
2) A non-NCQ command is queued, gets stored in ap->deferred_qc.
3) Last NCQ command gets completed, work is queued to issue the deferred
qc.
4) Timeout or error happens, ap->deferred_qc is cleared. The queued work is
currently NOT canceled.
5) Port is reset.
6) One or several NCQ commands are queued.
7) A non-NCQ command is queued, gets stored in ap->deferred_qc.
8) Work is finally run. Yet at this time, there is still NCQ commands in
flight.

The work in 8) really belongs to the non-NCQ command in 2), not to the
non-NCQ command in 7). The reason why the work is executed when it is not
supposed to, is because it was never canceled when ap->deferred_qc was
cleared in 4). Thus, ensure that we always cancel the work after clearing
ap->deferred_qc.

Another potential fix would have been to let ata_scsi_deferred_qc_work() do
nothing if ap->ops->qc_defer() returns non-zero. However, canceling the
work when clearing ap->deferred_qc seems slightly more logical, as we hold
the ap->lock when clearing ap->deferred_qc, so we know that the work cannot
be holding the lock. (The function could be waiting for the lock, but that
is okay since it will do nothing if ap->deferred_qc is not set.)

Summary

En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:

ata: libata: cancelar trabajo pendiente después de limpiar deferred_qc

Syzbot informó un WARN_ON() en ata_scsi_deferred_qc_work(), causado por ap->ops->qc_defer() que devolvía un valor distinto de cero antes de emitir el qc diferido.

ata_scsi_schedule_deferred_qc() es llamada durante cada finalización de comando. Esta función verificará si hay un QC diferido, y si ap->ops->qc_defer() devuelve cero, lo que significa que es posible encolar el qc diferido en este momento (sin ser diferido), entonces encolará el trabajo que emitirá el qc diferido.

Una vez que el trabajo se ejecuta, lo que potencialmente puede ser mucho tiempo después de que el trabajo fue programado, hay un WARN_ON() si ap->ops->qc_defer() devuelve un valor distinto de cero.

Mientras mantenemos el ap->lock tanto al asignar como al limpiar deferred_qc, y el trabajo en sí mantiene el ap->lock, el código actualmente no cancela el trabajo después de limpiar el qc diferido.

Esto significa que el siguiente escenario puede ocurrir:
1) Uno o varios comandos NCQ son encolados.
2) Un comando no-NCQ es encolado, se almacena en ap->deferred_qc.
3) El último comando NCQ se completa, el trabajo es encolado para emitir el qc diferido.
4) Ocurre un tiempo de espera o un error, ap->deferred_qc es limpiado. El trabajo encolado NO es cancelado actualmente.
5) El puerto es reiniciado.
6) Uno o varios comandos NCQ son encolados.
7) Un comando no-NCQ es encolado, se almacena en ap->deferred_qc.
8) El trabajo finalmente se ejecuta. Sin embargo, en este momento, todavía hay comandos NCQ en curso.

El trabajo en 8) realmente pertenece al comando no-NCQ en 2), no al comando no-NCQ en 7). La razón por la cual el trabajo se ejecuta cuando no se supone que debe hacerlo, es porque nunca fue cancelado cuando ap->deferred_qc fue limpiado en 4). Por lo tanto, asegúrese de que siempre cancelemos el trabajo después de limpiar ap->deferred_qc.

Otra solución potencial habría sido dejar que ata_scsi_deferred_qc_work() no hiciera nada si ap->ops->qc_defer() devuelve un valor distinto de cero. Sin embargo, cancelar el trabajo al limpiar ap->deferred_qc parece ligeramente más lógico, ya que mantenemos el ap->lock al limpiar ap->deferred_qc, por lo que sabemos que el trabajo no puede estar manteniendo el bloqueo. (La función podría estar esperando el bloqueo, pero eso está bien ya que no hará nada si ap->deferred_qc no está configurado.)

Publication Date March 25, 2026, 8:16 p.m.
Registration Date April 27, 2026, 12:18 p.m.
Last Update April 25, 2026, 4:13 a.m.
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.18.14 6.18.18
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.19.4 6.19.7
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
Related information, measures and tools
Common Vulnerabilities List