PT-2026-163037
CVE-2026-138996
·
Publicado
2026-11-30
·
Atualizado
2026-11-30
Descrição por
Pontuação
N/A
Não disponívelNão há classificações de severidade ou métricas disponíveis. Quando houver, atualizaremos as informações correspondentes na página.
In the Linux kernel, the following vulnerability has been resolved:
seccomp: restore knotif->state when SECCOMP ADDFD FLAG SEND is interrupted
In seccomp notify addfd(), when SECCOMP ADDFD FLAG SEND is set in
addfd.flags, knotif->state is optimistically transitioned from
SECCOMP NOTIFY SENT to SECCOMP NOTIFY REPLIED before waking the tracee
and waiting on kaddfd.completion:
if (addfd.flags & SECCOMP ADDFD FLAG SEND) {
knotif->state = SECCOMP NOTIFY REPLIED;
...
}If wait for completion interruptible(&kaddfd.completion) is interrupted
by a signal before the tracee dequeues the kaddfd request
(!list empty(&kaddfd.list)), seccomp notify addfd() removes kaddfd from
knotif->addfd and returns -EINTR to the supervisor without having
installed the file descriptor.
However, knotif->state is left as SECCOMP NOTIFY REPLIED (with
knotif->error == 0 and knotif->val == 0). This causes two problems:
-
When the tracee runs in do user notif(), it checks if (knotif.state != SECCOMP NOTIFY REPLIED) after calling seccomp handle addfd(). Because knotif->state is already SECCOMP NOTIFY REPLIED, the tracee exits the notification wait loop prematurely and returns 0 from the trapped syscall without the file descriptor ever having been installed.
-
If the supervisor retries SECCOMP IOCTL NOTIF ADDFD or SECCOMP IOCTL NOTIF SEND before the tracee runs, it fails with -EINPROGRESS because knotif->state is no longer SECCOMP NOTIFY SENT.
Fix this by restoring knotif->state back to SECCOMP NOTIFY SENT if
SECCOMP ADDFD FLAG SEND was set and kaddfd was not consumed before the
interrupted wait. Also add a seccomp bpf selftest
(user notification addfd send interrupted) covering this race.
Tested in QEMU against Linux 7.3.0-rc3 using the
user notification addfd send interrupted selftest added in this patch
(./seccomp bpf -t user notification addfd send interrupted): on the
unfixed kernel the test fails because the retry ioctl(listener,
SECCOMP IOCTL NOTIF ADDFD, &addfd) returns -EINPROGRESS (-1) and the
tracee prematurely exits do user notif() with return value 0 instead of
FD 42, whereas with this patch applied the test passes.
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾