// For flags

CVE-2021-47603

audit: improve robustness of the audit queue handling

Severity Score

"-"
*CVSS v-

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

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

audit: improve robustness of the audit queue handling

If the audit daemon were ever to get stuck in a stopped state the
kernel's kauditd_thread() could get blocked attempting to send audit
records to the userspace audit daemon. With the kernel thread
blocked it is possible that the audit queue could grow unbounded as
certain audit record generating events must be exempt from the queue
limits else the system enter a deadlock state.

This patch resolves this problem by lowering the kernel thread's
socket sending timeout from MAX_SCHEDULE_TIMEOUT to HZ/10 and tweaks
the kauditd_send_queue() function to better manage the various audit
queues when connection problems occur between the kernel and the
audit daemon. With this patch, the backlog may temporarily grow
beyond the defined limits when the audit daemon is stopped and the
system is under heavy audit pressure, but kauditd_thread() will
continue to make progress and drain the queues as it would for other
connection problems. For example, with the audit daemon put into a
stopped state and the system configured to audit every syscall it
was still possible to shutdown the system without a kernel panic,
deadlock, etc.; granted, the system was slow to shutdown but that is
to be expected given the extreme pressure of recording every syscall.

The timeout value of HZ/10 was chosen primarily through
experimentation and this developer's "gut feeling". There is likely
no one perfect value, but as this scenario is limited in scope (root
privileges would be needed to send SIGSTOP to the audit daemon), it
is likely not worth exposing this as a tunable at present. This can
always be done at a later date if it proves necessary.

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: auditoría: mejora la solidez del manejo de la cola de auditoría. Si el daemon de auditoría alguna vez se atascara en un estado detenido, kauditd_thread() del kernel podría bloquearse al intentar enviar registros de auditoría al espacio de usuario. daemon de auditoría. Con el subproceso del núcleo bloqueado, es posible que la cola de auditoría crezca sin límites, ya que ciertos eventos que generan registros de auditoría deben estar exentos de los límites de la cola, de lo contrario, el sistema entrará en un estado de bloqueo. Este parche resuelve este problema reduciendo el tiempo de espera de envío del socket del subproceso del núcleo de MAX_SCHEDULE_TIMEOUT a HZ/10 y modifica la función kauditd_send_queue() para gestionar mejor las distintas colas de auditoría cuando se producen problemas de conexión entre el núcleo y el daemon de auditoría. Con este parche, el trabajo pendiente puede crecer temporalmente más allá de los límites definidos cuando se detiene el daemon de auditoría y el sistema está bajo una fuerte presión de auditoría, pero kauditd_thread() continuará progresando y drenando las colas como lo haría con otros problemas de conexión. Por ejemplo, con el daemon de auditoría en estado detenido y el sistema configurado para auditar cada llamada al sistema, aún era posible apagar el sistema sin pánico en el kernel, interbloqueo, etc.; Por supuesto, el sistema tardó en cerrarse, pero eso es de esperarse dada la presión extrema de registrar cada llamada al sistema. El valor de tiempo de espera de HZ/10 se eligió principalmente a través de la experimentación y el "instinto" de este desarrollador. Probablemente no exista un valor perfecto, pero como este escenario tiene un alcance limitado (se necesitarían privilegios de root para enviar SIGSTOP al daemon de auditoría), probablemente no valga la pena exponerlo como un ajuste ajustable en este momento. Esto siempre se puede hacer en una fecha posterior si resulta necesario.

*Credits: N/A
CVSS Scores
Attack Vector
-
Attack Complexity
-
Privileges Required
-
User Interaction
-
Scope
-
Confidentiality
-
Integrity
-
Availability
-
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2024-05-24 CVE Reserved
  • 2024-06-19 CVE Published
  • 2024-06-20 EPSS Updated
  • 2024-08-04 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 4.11 < 4.14.259
Search vendor "Linux" for product "Linux Kernel" and version " >= 4.11 < 4.14.259"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 4.11 < 4.19.222
Search vendor "Linux" for product "Linux Kernel" and version " >= 4.11 < 4.19.222"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 4.11 < 5.4.168
Search vendor "Linux" for product "Linux Kernel" and version " >= 4.11 < 5.4.168"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 4.11 < 5.10.88
Search vendor "Linux" for product "Linux Kernel" and version " >= 4.11 < 5.10.88"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 4.11 < 5.15.11
Search vendor "Linux" for product "Linux Kernel" and version " >= 4.11 < 5.15.11"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 4.11 < 5.16
Search vendor "Linux" for product "Linux Kernel" and version " >= 4.11 < 5.16"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
4.10.7
Search vendor "Linux" for product "Linux Kernel" and version "4.10.7"
en
Affected