Skip to content

CVE-2024-47742 firmware_loader: Block path traversal

HighCVSS 7.8 EPSS 0.29%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial
Technology
Linux KernelUbuntuDebian

Description

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

firmware_loader: Block path traversal

Most firmware names are hardcoded strings, or are constructed from fairly
constrained format strings where the dynamic parts are just some hex
numbers or such.

However, there are a couple codepaths in the kernel where firmware file
names contain string components that are passed through from a device or
semi-privileged userspace; the ones I could find (not counting interfaces
that require root privileges) are:

  • lpfc_sli4_request_firmware_update() seems to construct the firmware
    filename from "ModelName", a string that was previously parsed out of
    some descriptor ("Vital Product Data") in lpfc_fill_vpd()
  • nfp_net_fw_find() seems to construct a firmware filename from a model
    name coming from nfp_hwinfo_lookup(pf->hwinfo, "nffw.partno"), which I
    think parses some descriptor that was read from the device.
    (But this case likely isn't exploitable because the format string looks
    like "netronome/nic_%s", and there shouldn't be any folders starting
    with "netronome/nic_". The previous case was different because there,
    the "%s" is at the start of the format string.)
  • module_flash_fw_schedule() is reachable from the
    ETHTOOL_MSG_MODULE_FW_FLASH_ACT netlink command, which is marked as
    GENL_UNS_ADMIN_PERM (meaning CAP_NET_ADMIN inside a user namespace is
    enough to pass the privilege check), and takes a userspace-provided
    firmware name.
    (But I think to reach this case, you need to have CAP_NET_ADMIN over a
    network namespace that a special kind of ethernet device is mapped into,
    so I think this is not a viable attack path in practice.)

Fix it by rejecting any firmware names containing ".." path components.

For what it's worth, I went looking and haven't found any USB device
drivers that use the firmware loader dangerously.

Upgrade path

11 packages: 10 fixed.

PackageAffectedFixed inStatus
debian/linux(Debian 12) < 6.1.115-1; = 6.1.27-1; = 6.1.37-1; = 6.1.38-1 +27 more 6.1.115-1 Fixed
debian/linux(Debian 13) < 6.11.2-1 6.11.2-1 Fixed
debian/linux(Debian 14) < 6.11.2-1 6.11.2-1 Fixed
Linux kernel < 4.19.323; < 5.4.285; < 5.10.227; < 5.15.168 +23 more 3d2411f4edcb649eaf232160db459bb4770b5251, 4.19.323, 5.4.285, 5.10.227, 5.15.168, 6.1.113, 6.6.54, 6.10.13, 6.11.2, 6.12, 6c4e13fdfcab34811c3143a0a03c05fec4e870ec, 9b1ca33ebd05b3acef5b976c04e5e791af93ce1b, 28f1cd94d3f1092728fb775a0fe26c5f1ac2ebeb, 7420c1bf7fc784e587b87329cc6dfa3dca537aa4, a77fc4acfd49fc6076e565445b2bc5fdc3244da4, c30558e6c5c9ad6c86459d9acce1520ceeab9ea6, d1768e5535d3ded59f888637016e6f821f4e069f, f0e5311aa8022107d63c54e2f03684ec097d1394 Fixed
Microsoft azure linux < 6.6.56.1-5 6.6.56.1-5 Fixed
ubuntu/linux(Ubuntu 22.04) < 5.15.0-127.137 5.15.0-127.137 Fixed
ubuntu/linux(Ubuntu 24.04) < 6.8.0-54.56 6.8.0-54.56 Fixed
ubuntu/linux-kvm(Ubuntu 22.04) < 5.15.0-1070.75 5.15.0-1070.75 Fixed
ubuntu/linux-raspi(Ubuntu 22.04) < 5.15.0-1066.69 5.15.0-1066.69 Fixed
ubuntu/linux-raspi(Ubuntu 24.04) < 6.8.0-1019.23 6.8.0-1019.23 Fixed
debian linux = 11.0 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
Microsoft azure linux < 6.6.56.1-5 6.6.56.1-5
debian/linux(Debian:12) < 6.1.115-1 6.1.115-1
debian/linux(Debian:12) = 6.1.106-1 No fix listed
debian/linux(Debian:12) = 6.1.106-2 No fix listed
debian/linux(Debian:12) = 6.1.106-3 No fix listed
debian/linux(Debian:12) = 6.1.112-1 No fix listed
debian/linux(Debian:12) = 6.1.27-1 No fix listed
debian/linux(Debian:12) = 6.1.37-1 No fix listed
debian/linux(Debian:12) = 6.1.38-1 No fix listed
debian/linux(Debian:12) = 6.1.38-2 No fix listed
debian/linux(Debian:12) = 6.1.38-2~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.38-3 No fix listed
debian/linux(Debian:12) = 6.1.38-4 No fix listed
debian/linux(Debian:12) = 6.1.38-4~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.52-1 No fix listed
debian/linux(Debian:12) = 6.1.55-1 No fix listed
debian/linux(Debian:12) = 6.1.55-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.64-1 No fix listed
debian/linux(Debian:12) = 6.1.66-1 No fix listed
debian/linux(Debian:12) = 6.1.67-1 No fix listed
debian/linux(Debian:12) = 6.1.69-1 No fix listed
debian/linux(Debian:12) = 6.1.69-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.76-1 No fix listed
debian/linux(Debian:12) = 6.1.76-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.82-1 No fix listed
Show 42 more
ProductAffected versionsFixed in
debian/linux(Debian:12) = 6.1.85-1 No fix listed
debian/linux(Debian:12) = 6.1.90-1 No fix listed
debian/linux(Debian:12) = 6.1.90-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.94-1 No fix listed
debian/linux(Debian:12) = 6.1.94-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.98-1 No fix listed
debian/linux(Debian:12) = 6.1.99-1 No fix listed
debian/linux(Debian:13) < 6.11.2-1 6.11.2-1
debian/linux(Debian:14) < 6.11.2-1 6.11.2-1
ubuntu/linux(Ubuntu:22.04) < 5.15.0-127.137 5.15.0-127.137
ubuntu/linux-kvm(Ubuntu:22.04) < 5.15.0-1070.75 5.15.0-1070.75
ubuntu/linux-raspi(Ubuntu:22.04) < 5.15.0-1066.69 5.15.0-1066.69
Linux kernel >= abb139e75c2cdbb955e840d6331cb5863e409d0e, < d1768e5535d3ded59f888637016e6f821f4e069f d1768e5535d3ded59f888637016e6f821f4e069f
Linux kernel >= abb139e75c2cdbb955e840d6331cb5863e409d0e, < 9b1ca33ebd05b3acef5b976c04e5e791af93ce1b 9b1ca33ebd05b3acef5b976c04e5e791af93ce1b
Linux kernel >= abb139e75c2cdbb955e840d6331cb5863e409d0e, < c30558e6c5c9ad6c86459d9acce1520ceeab9ea6 c30558e6c5c9ad6c86459d9acce1520ceeab9ea6
Linux kernel >= abb139e75c2cdbb955e840d6331cb5863e409d0e, < a77fc4acfd49fc6076e565445b2bc5fdc3244da4 a77fc4acfd49fc6076e565445b2bc5fdc3244da4
Linux kernel >= abb139e75c2cdbb955e840d6331cb5863e409d0e, < 3d2411f4edcb649eaf232160db459bb4770b5251 3d2411f4edcb649eaf232160db459bb4770b5251
Linux kernel >= abb139e75c2cdbb955e840d6331cb5863e409d0e, < 7420c1bf7fc784e587b87329cc6dfa3dca537aa4 7420c1bf7fc784e587b87329cc6dfa3dca537aa4
Linux kernel >= abb139e75c2cdbb955e840d6331cb5863e409d0e, < 28f1cd94d3f1092728fb775a0fe26c5f1ac2ebeb 28f1cd94d3f1092728fb775a0fe26c5f1ac2ebeb
Linux kernel >= abb139e75c2cdbb955e840d6331cb5863e409d0e, < 6c4e13fdfcab34811c3143a0a03c05fec4e870ec 6c4e13fdfcab34811c3143a0a03c05fec4e870ec
Linux kernel >= abb139e75c2cdbb955e840d6331cb5863e409d0e, < f0e5311aa8022107d63c54e2f03684ec097d1394 f0e5311aa8022107d63c54e2f03684ec097d1394
Linux kernel = 3.7 No fix listed
Linux kernel < 4.19.323 4.19.323
Linux kernel < 5.4.285 5.4.285
Linux kernel < 5.10.227 5.10.227
Linux kernel < 5.15.168 5.15.168
Linux kernel < 6.1.113 6.1.113
Linux kernel < 6.6.54 6.6.54
Linux kernel < 6.10.13 6.10.13
Linux kernel < 6.11.2 6.11.2
Linux kernel < 6.12 6.12
ubuntu/linux(Ubuntu:24.04) < 6.8.0-54.56 6.8.0-54.56
ubuntu/linux-raspi(Ubuntu:24.04) < 6.8.0-1019.23 6.8.0-1019.23
debian linux = 11.0 No fix listed
Linux kernel >= 3.7, < 4.19.323 4.19.323
Linux kernel >= 4.20, < 5.4.285 5.4.285
Linux kernel >= 5.5, < 5.10.227 5.10.227
Linux kernel >= 5.11, < 5.15.168 5.15.168
Linux kernel >= 5.16, < 6.1.113 6.1.113
Linux kernel >= 6.2, < 6.6.54 6.6.54
Linux kernel >= 6.7, < 6.10.13 6.10.13
Linux kernel >= 6.11, < 6.11.2 6.11.2

References