kernel crash : net_sched race condition in tcindex_destroy()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
High
|
Andrea Righi | ||
Bionic |
Fix Released
|
High
|
Andrea Righi |
Bug Description
[Impact]
It is possible to trigger a NULL pointer dereference in tcindex_delete() with a simple reproducer script, this is because in tcindex_set_parms() when old_r doesn't exist we set the new exts to cr.exts that can be uninitialized, triggering the NULL pointer dereference.
In addition to that we may also hit a race condition in tcindex_destroy() (as pointed out in the original bug report and also here: https:/
However adding these changes introduces three memory leak problems in cls_tcindex (that can be easily verified using the same test case). These leaks are also fixed upstream by 711ff09f3330 "net_sched: fix a memory leak in cls_tcindex" and 000d2aeda70c "net_sched: fix two more memory leaks in cls_tcindex", so we need to backport also these two additional fixes.
After all these fixes are applied the test case doesn't seem to trigger any bug.
[Test Case]
#!/bin/sh -ex
modprobe ifb
while true; do
tc qdisc add dev ifb0 root handle 2:0 prio bands 5
tc qdisc add dev ifb0 parent 2:5 sfq
tc filter add dev ifb0 parent 2:0 protocol ip prio 5 handle 0 tcindex mask 0 classid 2:5 pass_on
tc qdisc del dev ifb0 root || true
done
[Fix]
* Fixes required to solve this problem:
https:/
https:/
https:/
https:/
[Regression Potential]
* All upstream fixes, tested on the affected platform, backport changes are minimal.
[Original bug report]
I am running into a kernel crash issue using latest Ubuntu 4.15 kernel.
It does not appear to have been fixed in Ubuntu-
This crash has also been reported for debian:
https:/
The kernel crash issue was fixed in February in the Linux kernel:
https:/
I did test one of the recent kernel-ppa/mainline kernels, more specifically:
linux-image-
It seems to fix the problem, that is, no crashes experienced so far.
CVE References
Changed in linux (Ubuntu): | |
assignee: | nobody → Andrea Righi (arighi) |
importance: | Undecided → Medium |
tags: | added: bionic cosmic |
description: | updated |
Changed in linux (Ubuntu Bionic): | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Andrea Righi (arighi) |
Changed in linux (Ubuntu): | |
importance: | Medium → High |
tags: | added: cscc |
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1825942
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.