CVE-2023-54251

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-54251
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-54251.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-54251
Downstream
Published
2025-12-30T12:15:48.145Z
Modified
2025-12-31T00:20:50.883727Z
Summary
net/sched: taprio: Limit TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME to INT_MAX.
Details

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

net/sched: taprio: Limit TCATAPRIOATTRSCHEDCYCLETIME to INTMAX.

syzkaller found zero division error [0] in divs64rem() called from getcycletimeelapsed(), where sched->cycletime is the divisor.

We have tests in parsetaprioschedule() so that cycletime will never be 0, and actually cycletime is not 0 in getcycletime_elapsed().

The problem is that the types of divisor are different; cycletime is s64, but the argument of divs64_rem() is s32.

syzkaller fed this input and 0x100000000 is cast to s32 to be 0.

@TCATAPRIOATTRSCHEDCYCLE_TIME={0xc, 0x8, 0x100000000}

We use s64 for cycletime to cast it to ktimet, so let's keep it and set max for cycle_time.

While at it, we prevent overflow in setuptxtime() and add another test in parsetaprioschedule() to check if cycletime overflows.

Also, we add a new tdc test case for this issue.

CPU: 1 PID: 103 Comm: kworker/1:3 Not tainted 6.5.0-rc1-00330-g60cc1f7d0605 #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Workqueue: ipv6addrconf addrconfdadwork RIP: 0010:divs64rem include/linux/math64.h:42 [inline] RIP: 0010:getcycletimeelapsed net/sched/schtaprio.c:223 [inline] RIP: 0010:findentrytotransmit+0x252/0x7e0 net/sched/schtaprio.c:344 Code: 3c 02 00 0f 85 5e 05 00 00 48 8b 4c 24 08 4d 8b bd 40 01 00 00 48 8b 7c 24 48 48 89 c8 4c 29 f8 48 63 f7 48 99 48 89 74 24 70 <48> f7 fe 48 29 d1 48 8d 04 0f 49 89 cc 48 89 44 24 20 49 8d 85 10 RSP: 0018:ffffc90000acf260 EFLAGS: 00010206 RAX: 177450e0347560cf RBX: 0000000000000000 RCX: 177450e0347560cf RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000100000000 RBP: 0000000000000056 R08: 0000000000000000 R09: ffffed10020a0934 R10: ffff8880105049a7 R11: ffff88806cf3a520 R12: ffff888010504800 R13: ffff88800c00d800 R14: ffff8880105049a0 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f0edf84f0e8 CR3: 000000000d73c002 CR4: 0000000000770ee0 PKRU: 55555554 Call Trace: <TASK> getpackettxtime net/sched/schtaprio.c:508 [inline] taprioenqueueone+0x900/0xff0 net/sched/schtaprio.c:577 taprioenqueue+0x378/0xae0 net/sched/schtaprio.c:658 devqdiscenqueue+0x46/0x170 net/core/dev.c:3732 _devxmitskb net/core/dev.c:3821 [inline] _devqueuexmit+0x1b2f/0x3000 net/core/dev.c:4169 devqueuexmit include/linux/netdevice.h:3088 [inline] neighresolveoutput net/core/neighbour.c:1552 [inline] neighresolveoutput+0x4a7/0x780 net/core/neighbour.c:1532 neighoutput include/net/neighbour.h:544 [inline] ip6finishoutput2+0x924/0x17d0 net/ipv6/ip6output.c:135 _ip6finishoutput+0x620/0xaa0 net/ipv6/ip6output.c:196 ip6finishoutput net/ipv6/ip6output.c:207 [inline] NFHOOKCOND include/linux/netfilter.h:292 [inline] ip6output+0x206/0x410 net/ipv6/ip6output.c:228 dstoutput include/net/dst.h:458 [inline] NFHOOK.constprop.0+0xea/0x260 include/linux/netfilter.h:303 ndiscsendskb+0x872/0xe80 net/ipv6/ndisc.c:508 ndiscsendns+0xb5/0x130 net/ipv6/ndisc.c:666 addrconfdadwork+0xc14/0x13f0 net/ipv6/addrconf.c:4175 processonework+0x92c/0x13a0 kernel/workqueue.c:2597 workerthread+0x60f/0x1240 kernel/workqueue.c:2748 kthread+0x2fe/0x3f0 kernel/kthread.c:389 retfromfork+0x2c/0x50 arch/x86/entry/entry64.S:308 </TASK> Modules linked in:

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54251.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4cfd5779bd6efe8c76b4494aec63a063be0d2ff2
Fixed
f04f6d9b3b060f7e11219a65a76da65f1489e391
Fixed
0b45af982a4df0b14fb8669ee2a871cfdfa6a39c
Fixed
57b3fe08ae06ef11af007b4a182629b12a961e30
Fixed
e739718444f7bf2fa3d70d101761ad83056ca628

Affected versions

v5.*

v5.10
v5.10-rc1
v5.10-rc2
v5.10-rc3
v5.10-rc4
v5.10-rc5
v5.10-rc6
v5.10-rc7
v5.11
v5.11-rc1
v5.11-rc2
v5.11-rc3
v5.11-rc4
v5.11-rc5
v5.11-rc6
v5.11-rc7
v5.12
v5.12-rc1
v5.12-rc1-dontuse
v5.12-rc2
v5.12-rc3
v5.12-rc4
v5.12-rc5
v5.12-rc6
v5.12-rc7
v5.12-rc8
v5.13
v5.13-rc1
v5.13-rc2
v5.13-rc3
v5.13-rc4
v5.13-rc5
v5.13-rc6
v5.13-rc7
v5.14
v5.14-rc1
v5.14-rc2
v5.14-rc3
v5.14-rc4
v5.14-rc5
v5.14-rc6
v5.14-rc7
v5.15
v5.15-rc1
v5.15-rc2
v5.15-rc3
v5.15-rc4
v5.15-rc5
v5.15-rc6
v5.15-rc7
v5.15.1
v5.15.10
v5.15.100
v5.15.101
v5.15.102
v5.15.103
v5.15.104
v5.15.105
v5.15.106
v5.15.107
v5.15.108
v5.15.109
v5.15.11
v5.15.110
v5.15.111
v5.15.112
v5.15.113
v5.15.114
v5.15.115
v5.15.116
v5.15.117
v5.15.118
v5.15.119
v5.15.12
v5.15.120
v5.15.121
v5.15.122
v5.15.123
v5.15.124
v5.15.125
v5.15.13
v5.15.14
v5.15.15
v5.15.16
v5.15.17
v5.15.18
v5.15.19
v5.15.2
v5.15.20
v5.15.21
v5.15.22
v5.15.23
v5.15.24
v5.15.25
v5.15.26
v5.15.27
v5.15.28
v5.15.29
v5.15.3
v5.15.30
v5.15.31
v5.15.32
v5.15.33
v5.15.34
v5.15.35
v5.15.36
v5.15.37
v5.15.38
v5.15.39
v5.15.4
v5.15.40
v5.15.41
v5.15.42
v5.15.43
v5.15.44
v5.15.45
v5.15.46
v5.15.47
v5.15.48
v5.15.49
v5.15.5
v5.15.50
v5.15.51
v5.15.52
v5.15.53
v5.15.54
v5.15.55
v5.15.56
v5.15.57
v5.15.58
v5.15.59
v5.15.6
v5.15.60
v5.15.61
v5.15.62
v5.15.63
v5.15.64
v5.15.65
v5.15.66
v5.15.67
v5.15.68
v5.15.69
v5.15.7
v5.15.70
v5.15.71
v5.15.72
v5.15.73
v5.15.74
v5.15.75
v5.15.76
v5.15.77
v5.15.78
v5.15.79
v5.15.8
v5.15.80
v5.15.81
v5.15.82
v5.15.83
v5.15.84
v5.15.85
v5.15.86
v5.15.87
v5.15.88
v5.15.89
v5.15.9
v5.15.90
v5.15.91
v5.15.92
v5.15.93
v5.15.94
v5.15.95
v5.15.96
v5.15.97
v5.15.98
v5.15.99
v5.16
v5.16-rc1
v5.16-rc2
v5.16-rc3
v5.16-rc4
v5.16-rc5
v5.16-rc6
v5.16-rc7
v5.16-rc8
v5.17
v5.17-rc1
v5.17-rc2
v5.17-rc3
v5.17-rc4
v5.17-rc5
v5.17-rc6
v5.17-rc7
v5.17-rc8
v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.19
v5.19-rc1
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7
v5.19-rc8
v5.2
v5.2-rc7
v5.3
v5.3-rc1
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v6.3
v6.3-rc1
v6.3-rc2
v6.3-rc3
v6.3-rc4
v6.3-rc5
v6.3-rc6
v6.3-rc7
v6.4
v6.4-rc1
v6.4-rc2
v6.4-rc3
v6.4-rc4
v6.4-rc5
v6.4-rc6
v6.4-rc7
v6.4.1
v6.4.2
v6.4.3
v6.4.4
v6.4.5
v6.4.6
v6.4.7
v6.4.8
v6.4.9
v6.5-rc1
v6.5-rc2
v6.5-rc3

Database specific

source

"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-54251.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.3.0
Fixed
5.15.126
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.45
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.4.10

Database specific

source

"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-54251.json"