CVE-2024-53044: net/sched: sch_api: fix xa_insert() error path in tcf_block_get_ext()

Published Nov 19, 2024
·
Updated

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

net/sched: schapi: fix xainsert() error path in tcfblockgetext()

This command:

$ tc qdisc replace dev eth0 ingressblock 1 egressblock 1 clsact Error: block dev insert failed: -EBUSY.

fails because user space requests the same block index to be set for both ingress and egress.

[ side note, I don't think it even failed prior to commit 913b47d3424e ("net/sched: Introduce tc block netdev tracking infra"), because this is a command from an old set of notes of mine which used to work, but alas, I did not scientifically bisect this ]

The problem is not that it fails, but rather, that the second time around, it fails differently (and irrecoverably):

$ tc qdisc replace dev eth0 ingressblock 1 egressblock 1 clsact Error: dsacore: Flow block cb is busy.

[ another note: the extack is added by me for illustration purposes. the context of the problem is that clsactinit() obtains the same &q->ingressblock pointer as &q->egressblock, and since we call tcfblockgetext() on both of them, "dev" will be added to the block->ports xarray twice, thus failing the operation: once through the ingress block pointer, and once again through the egress block pointer. the problem itself is that when xainsert() fails, we have emitted a FLOWBLOCKBIND command through ndosetuptc(), but the offload never sees a corresponding FLOWBLOCKUNBIND. ]

Even correcting the bad user input, we still cannot recover:

$ tc qdisc replace dev swp3 ingressblock 1 egressblock 2 clsact Error: dsacore: Flow block cb is busy.

Basically the only way to recover is to reboot the system, or unbind and rebind the net device driver.

To fix the bug, we need to fill the correct error teardown path which was missed during code movement, and call tcfblockoffloadunbind() when xainsert() fails.

[ last note, fundamentally I blame the label naming convention in tcfblockgetext() for the bug. The labels should be named after what they do, not after the error path that jumps to them. This way, it is obviously wrong that two labels pointing to the same code mean something is wrong, and checking the code correctness at the goto site is also easier ]

Other sources

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

net/sched: schapi: fix xainsert() error path in tcfblockgetext()

This command:

$ tc qdisc replace dev eth0 ingressblock 1 egressblock 1 clsact Error: block dev insert failed: -EBUSY.

fails because user space requests the same block index to be set for both ingress and egress.

[ side note, I don't think it even failed prior to commit 913b47d3424e ("net/sched: Introduce tc block netdev tracking infra"), because this is a command from an old set of notes of mine which used to work, but alas, I did not scientifically bisect this ]

The problem is not that it fails, but rather, that the second time around, it fails differently (and irrecoverably):

$ tc qdisc replace dev eth0 ingressblock 1 egressblock 1 clsact Error: dsacore: Flow block cb is busy.

[ another note: the extack is added by me for illustration purposes. the context of the problem is that clsactinit() obtains the same &q->ingressblock pointer as &q->egressblock, and since we call tcfblockgetext() on both of them, "dev" will be added to the block->ports xarray twice, thus failing the operation: once through the ingress block pointer, and once again through the egress block pointer. the problem itself is that when xainsert() fails, we have emitted a FLOWBLOCKBIND command through ndosetuptc(), but the offload never sees a corresponding FLOWBLOCKUNBIND. ]

Even correcting the bad user input, we still cannot recover:

$ tc qdisc replace dev swp3 ingressblock 1 egressblock 2 clsact Error: dsacore: Flow block cb is busy.

Basically the only way to recover is to reboot the system, or unbind and rebind the net device driver.

To fix the bug, we need to fill the correct error teardown path which was missed during code movement, and call tcfblockoffloadunbind() when xainsert() fails.

[ last note, fundamentally I blame the label naming convention in tcfblockgetext() for the bug. The labels should be named after what they do, not after the error path that jumps to them. This way, it is obviously wrong that two labels pointing to the same code mean something is wrong, and checking the code correctness at the goto site is also easier ]

NVD

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

Launchpad

Affected Software

7 affected componentsFixes available
Linux Linux kernel>=6.8<6.11.7
Linux Linux kernel=6.12-rc1
Linux Linux kernel=6.12-rc2
Linux Linux kernel=6.12-rc3
Linux Linux kernel=6.12-rc4
Linux Linux kernel=6.12-rc5
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1

Event History

Nov 19, 2024
CVE Published
via MITRE·05:19 PM
Data Sourced
via MITRE·05:19 PM
DescriptionSeverity
Data Sourced
via Red Hat·06:04 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·06:15 PM
RemedyDescriptionSeverityAffected Software
Feb 20, 2025
Data Sourced
via Launchpad·12:51 AM
Description
May 7, 2025
Data Sourced
via Ubuntu·01:09 AM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-53044?

CVE-2024-53044 is a vulnerability in the Linux kernel with a severity rating that can impact network scheduling operations.

2

How do I fix CVE-2024-53044?

To resolve CVE-2024-53044, update your Linux kernel to the latest version past 6.11.7 or any of the 6.12 release candidates.

3

What versions of the Linux kernel are affected by CVE-2024-53044?

CVE-2024-53044 affects Linux kernel versions from 6.8 to 6.11.7 and the release candidates 6.12-rc1 through 6.12-rc5.

4

What does CVE-2024-53044 vulnerabilities do?

CVE-2024-53044 relates to an error handling issue in the packet scheduler that can prevent proper insertion of network blocks.

5

Is CVE-2024-53044 reversible or permanent?

The effects of CVE-2024-53044 are reversible by applying the necessary kernel updates, mitigating the issue immediately.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203