// For flags

CVE-2024-27414

rtnetlink: fix error logic of IFLA_BRIDGE_FLAGS writing back

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:

rtnetlink: fix error logic of IFLA_BRIDGE_FLAGS writing back

In the commit d73ef2d69c0d ("rtnetlink: let rtnl_bridge_setlink checks
IFLA_BRIDGE_MODE length"), an adjustment was made to the old loop logic
in the function `rtnl_bridge_setlink` to enable the loop to also check
the length of the IFLA_BRIDGE_MODE attribute. However, this adjustment
removed the `break` statement and led to an error logic of the flags
writing back at the end of this function.

if (have_flags)
memcpy(nla_data(attr), &flags, sizeof(flags));
// attr should point to IFLA_BRIDGE_FLAGS NLA !!!

Before the mentioned commit, the `attr` is granted to be IFLA_BRIDGE_FLAGS.
However, this is not necessarily true fow now as the updated loop will let
the attr point to the last NLA, even an invalid NLA which could cause
overflow writes.

This patch introduces a new variable `br_flag` to save the NLA pointer
that points to IFLA_BRIDGE_FLAGS and uses it to resolve the mentioned
error logic.

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: rtnetlink: corrige la lógica de error de la reescritura de IFLA_BRIDGE_FLAGS En el commit d73ef2d69c0d ("rtnetlink: let rtnl_bridge_setlink comprueba la longitud de IFLA_BRIDGE_MODE"), se realizó un ajuste a la lógica de bucle anterior en la función ` rtnl_bridge_setlink` para permitir que el bucle también verifique la longitud del atributo IFLA_BRIDGE_MODE. Sin embargo, este ajuste eliminó la declaración "break" y generó una lógica de error en la escritura de los indicadores al final de esta función. if (have_flags) memcpy(nla_data(attr), &flags, sizeof(flags)); // attr debería apuntar a IFLA_BRIDGE_FLAGS NLA !!! Antes de la confirmación mencionada, se concede que el `attr` sea IFLA_BRIDGE_FLAGS. Sin embargo, esto no es necesariamente cierto ahora, ya que el bucle actualizado permitirá que el atributo apunte al último NLA, incluso un NLA no válido que podría causar escrituras desbordadas. Este parche introduce una nueva variable `br_flag` para guardar el puntero NLA que apunta a IFLA_BRIDGE_FLAGS y lo usa para resolver la lógica de error mencionada.

*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-02-25 CVE Reserved
  • 2024-05-17 CVE Published
  • 2024-05-18 EPSS Updated
  • 2024-08-02 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"
>= 5.4.253 < 5.4.271
Search vendor "Linux" for product "Linux Kernel" and version " >= 5.4.253 < 5.4.271"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 5.10.190 < 5.10.212
Search vendor "Linux" for product "Linux Kernel" and version " >= 5.10.190 < 5.10.212"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 5.15.126 < 5.15.151
Search vendor "Linux" for product "Linux Kernel" and version " >= 5.15.126 < 5.15.151"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 6.1.45 < 6.1.81
Search vendor "Linux" for product "Linux Kernel" and version " >= 6.1.45 < 6.1.81"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 6.5 < 6.6.21
Search vendor "Linux" for product "Linux Kernel" and version " >= 6.5 < 6.6.21"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 6.5 < 6.7.9
Search vendor "Linux" for product "Linux Kernel" and version " >= 6.5 < 6.7.9"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 6.5 < 6.8
Search vendor "Linux" for product "Linux Kernel" and version " >= 6.5 < 6.8"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
6.4.10
Search vendor "Linux" for product "Linux Kernel" and version "6.4.10"
en
Affected