Lucene search

K
cve416baaa9-dc9f-4396-8d5f-8c081fb06d67CVE-2024-27414
HistoryMay 17, 2024 - 12:15 p.m.

CVE-2024-27414

2024-05-1712:15:12
416baaa9-dc9f-4396-8d5f-8c081fb06d67
web.nvd.nist.gov
31
cve-2024-27414
rtnetlink vulnerability
linux kernel
error logic
ifla_bridge_flags
security patch
commit
nvd
overflow writes

6.6 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

10.4%

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.

Affected configurations

Vulners
Node
linuxlinux_kernelRange6.55.4.271
OR
linuxlinux_kernelRange5.5.05.10.212
OR
linuxlinux_kernelRange5.11.05.15.151
OR
linuxlinux_kernelRange5.16.06.1.81
OR
linuxlinux_kernelRange6.2.06.6.21
OR
linuxlinux_kernelRange6.7.06.7.9
OR
linuxlinux_kernelRange6.8.0
VendorProductVersionCPE
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "net/core/rtnetlink.c"
    ],
    "versions": [
      {
        "version": "ad46d4861ed3",
        "lessThan": "b9fbc44159df",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "abb0172fa8dc",
        "lessThan": "882a51a10ecf",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "047508edd602",
        "lessThan": "a1227b27fccc",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "8dfac8071d58",
        "lessThan": "f2261eb994aa",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "d73ef2d69c0d",
        "lessThan": "167d8642daa6",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "d73ef2d69c0d",
        "lessThan": "831bc2728fb4",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "d73ef2d69c0d",
        "lessThan": "743ad091fb46",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "net/core/rtnetlink.c"
    ],
    "versions": [
      {
        "version": "6.5",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "6.5",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.4.271",
        "lessThanOrEqual": "5.4.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.10.212",
        "lessThanOrEqual": "5.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.15.151",
        "lessThanOrEqual": "5.15.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.1.81",
        "lessThanOrEqual": "6.1.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.6.21",
        "lessThanOrEqual": "6.6.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.7.9",
        "lessThanOrEqual": "6.7.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.8",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

6.6 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

10.4%