# CVE-2022-48644: net/sched: taprio: avoid disabling offload when it was never enabled

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 16, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-04-28T13:00:07.584Z
- **Modified:** 2026-06-17T05:15:48.383Z

## Who should check

- Anyone running Linux \>= 9c66d15646760eb8982242b4531c4d4fd36118fd, \< d12a1eb07003e597077329767c6aa86a7e972c76; \>= 9c66d15646760eb8982242b4531c4d4fd36118fd, \< 586def6ebed195f3594a4884f7c5334d0e1ad1bb; \>= 9c66d15646760eb8982242b4531c4d4fd36118fd, \< f58e43184226e5e9662088ccf1389e424a3a4cbd; \>= 9c66d15646760eb8982242b4531c4d4fd36118fd, \< c7c9c7eb305ab8b4e93e4e4e1b78d8cfcbc26323; \>= 9c66d15646760eb8982242b4531c4d4fd36118fd, \< db46e3a88a09c5cf7e505664d01da7238cd56c92
- Anyone running Linux 5.4

## Description

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

net/sched: taprio: avoid disabling offload when it was never enabled

In an incredibly strange API design decision, qdisc-\>destroy() gets
called even if qdisc-\>init() never succeeded, not exclusively since
commit 87b60cfacf9f ("net\_sched: fix error recovery at qdisc creation"),
but apparently also earlier (in the case of qdisc\_create\_dflt()).

The taprio qdisc does not fully acknowledge this when it attempts full
offload, because it starts off with q-\>flags = TAPRIO\_FLAGS\_INVALID in
taprio\_init(), then it replaces q-\>flags with TCA\_TAPRIO\_ATTR\_FLAGS
parsed from netlink (in taprio\_change(), tail called from taprio\_init()).

But in taprio\_destroy(), we call taprio\_disable\_offload(), and this
determines what to do based on FULL\_OFFLOAD\_IS\_ENABLED(q-\>flags).

But looking at the implementation of FULL\_OFFLOAD\_IS\_ENABLED()
(a bitwise check of bit 1 in q-\>flags), it is invalid to call this macro
on q-\>flags when it contains TAPRIO\_FLAGS\_INVALID, because that is set
to U32\_MAX, and therefore FULL\_OFFLOAD\_IS\_ENABLED() will return true on
an invalid set of flags.

As a result, it is possible to crash the kernel if user space forces an
error between setting q-\>flags = TAPRIO\_FLAGS\_INVALID, and the calling
of taprio\_enable\_offload(). This is because drivers do not expect the
offload to be disabled when it was never enabled.

The error that we force here is to attach taprio as a non-root qdisc,
but instead as child of an mqprio root qdisc:

$ tc qdisc add dev swp0 root handle 1: \\
	mqprio num\_tc 8 map 0 1 2 3 4 5 6 7 \\
	queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 hw 0
$ tc qdisc replace dev swp0 parent 1:1 \\
	taprio num\_tc 8 map 0 1 2 3 4 5 6 7 \\
	queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 base-time 0 \\
	sched-entry S 0x7f 990000 sched-entry S 0x80 100000 \\
	flags 0x0 clockid CLOCK\_TAI
Unable to handle kernel paging request at virtual address fffffffffffffff8
\[fffffffffffffff8\] pgd=0000000000000000, p4d=0000000000000000
Internal error: Oops: 96000004 \[\#1\] PREEMPT SMP
Call trace:
 taprio\_dump+0x27c/0x310
 vsc9959\_port\_setup\_tc+0x1f4/0x460
 felix\_port\_setup\_tc+0x24/0x3c
 dsa\_slave\_setup\_tc+0x54/0x27c
 taprio\_disable\_offload.isra.0+0x58/0xe0
 taprio\_destroy+0x80/0x104
 qdisc\_create+0x240/0x470
 tc\_modify\_qdisc+0x1fc/0x6b0
 rtnetlink\_rcv\_msg+0x12c/0x390
 netlink\_rcv\_skb+0x5c/0x130
 rtnetlink\_rcv+0x1c/0x2c

Fix this by keeping track of the operations we made, and undo the
offload only if we actually did it.

I've added "bool offloaded" inside a 4 byte hole between "int clockid"
and "atomic64\_t picos\_per\_byte". Now the first cache line looks like
below:

$ pahole -C taprio\_sched net/sched/sch\_taprio.o
struct taprio\_sched {
        struct Qdisc \* \*           qdiscs;               /\*     0     8 \*/
        struct Qdisc \*             root;                 /\*     8     8 \*/
        u32                        flags;                /\*    16     4 \*/
        enum tk\_offsets            tk\_offset;            /\*    20     4 \*/
        int                        clockid;              /\*    24     4 \*/
        bool                       offloaded;            /\*    28     1 \*/

        /\* XXX 3 bytes hole, try to pack \*/

        atomic64\_t                 picos\_per\_byte;       /\*    32     0 \*/

        /\* XXX 8 bytes hole, try to pack \*/

        spinlock\_t                 current\_entry\_lock;   /\*    40     0 \*/

        /\* XXX 8 bytes hole, try to pack \*/

        struct sched\_entry \*       current\_entry;        /\*    48     8 \*/
        struct sched\_gate\_list \*   oper\_sched;           /\*    56     8 \*/
        /\* --- cacheline 1 boundary (64 bytes) --- \*/

## Affected and fixed versions

- Linux: \>= 9c66d15646760eb8982242b4531c4d4fd36118fd, \< d12a1eb07003e597077329767c6aa86a7e972c76; \>= 9c66d15646760eb8982242b4531c4d4fd36118fd, \< 586def6ebed195f3594a4884f7c5334d0e1ad1bb; \>= 9c66d15646760eb8982242b4531c4d4fd36118fd, \< f58e43184226e5e9662088ccf1389e424a3a4cbd; \>= 9c66d15646760eb8982242b4531c4d4fd36118fd, \< c7c9c7eb305ab8b4e93e4e4e1b78d8cfcbc26323; \>= 9c66d15646760eb8982242b4531c4d4fd36118fd, \< db46e3a88a09c5cf7e505664d01da7238cd56c92 (cvelist)
- Linux: 5.4 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-48644. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-48644.md
Affected: Linux >= 9c66d15646760eb8982242b4531c4d4fd36118fd, < d12a1eb07003e597077329767c6aa86a7e972c76; >= 9c66d15646760eb8982242b4531c4d4fd36118fd, < 586def6ebed195f3594a4884f7c5334d0e1ad1bb; >= 9c66d15646760eb8982242b4531c4d4fd36118fd, < f58e43184226e5e9662088ccf1389e424a3a4cbd; >= 9c66d15646760eb8982242b…
Fixed in: Linux 586def6ebed195f3594a4884f7c5334d0e1ad1bb

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-48644 being exploited?

There is no confirmed exploitation: CVE-2022-48644 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-48644?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-48644?

Linux \>= 9c66d15646760eb8982242b4531c4d4fd36118fd, \< d12a1eb07003e597077329767c6aa86a7e972c76; \>= 9c66d15646760eb8982242b4531c4d4fd36118fd, \< 586def6ebed195f3594a4884f7c5334d0e1ad1bb; \>= 9c66d15646760eb8982242b4531c4d4fd36118fd, \< f58e43184226e5e9662088ccf1389e424a3a4cbd; \>= 9c66d15646760eb8982242b4531c4d4fd36118fd, \< c7c9c7eb305ab8b4e93e4e4e1b78d8cfcbc26323; \>= 9c66d15646760eb8982242b4531c4d4fd36118fd, \< db46e3a88a09c5cf7e505664d01da7238cd56c92; Linux 5.4.

### Is there a fix for CVE-2022-48644?

Yes. Fixed in Linux 586def6ebed195f3594a4884f7c5334d0e1ad1bb. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-48644?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/d12a1eb07003e597077329767c6aa86a7e972c76>
- patch: <https://git.kernel.org/stable/c/586def6ebed195f3594a4884f7c5334d0e1ad1bb>
- patch: <https://git.kernel.org/stable/c/f58e43184226e5e9662088ccf1389e424a3a4cbd>
- patch: <https://git.kernel.org/stable/c/c7c9c7eb305ab8b4e93e4e4e1b78d8cfcbc26323>
- patch: <https://git.kernel.org/stable/c/db46e3a88a09c5cf7e505664d01da7238cd56c92>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-48644>

HTML: <https://flawdb.com/CVE-2022-48644> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-48644>
