iproute2 segfaults when filtering sockets
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
iproute2 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Low
|
Unassigned |
Bug Description
[Impact]
* The ss tool crashes when a query returns no results (seg fault)
[Test Case]
* $ sudo ss -Hnp -o state established 'dport = 22' src 127.0.0.1 dst 127.0.0.1
Segmentation fault
* PPA with the fix: https:/
[Where problems could occur]
* The ss tool is impacted and it has its code changed for the fix.
* The fix is a clean cherry-pick and straightforward (moving declaration after a NULL check).
[Other Info]
When in Ubuntu Bionic, if one calls:
$ sudo ss -Hnp -o state established 'dport = 22' src 127.0.0.1 dst 127.0.0.1
tcp 0 0 127.0.0.1:58910 127.0.0.1:22 users:(
it works. Just like when in Groovy:
$ sudo ss -Hnp -o state established 'dport = 22' src 127.0.0.1 dst 127.0.0.1
tcp 0 0 127.0.0.1:58908 127.0.0.1:22 users:(
but.. if there is nothing to show, in Bionic we get a segfault:
$ sudo ss -Hnp -o state established 'dport = 22' src 127.0.0.1 dst 127.0.0.1
Segmentation fault
Related branches
- Rafael David Tinoco (community): Approve
- Stefan Bader (community): Approve (code)
- Robie Basak: Approve (sru)
-
Diff: 70 lines (+48/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/lp1913187-ss-fix-NULL-dereference-when-rendering.patch (+40/-0)
debian/patches/series (+1/-0)
Changed in iproute2 (Ubuntu): | |
status: | New → Confirmed |
Changed in iproute2 (Ubuntu Bionic): | |
status: | New → Confirmed |
Changed in iproute2 (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in iproute2 (Ubuntu Bionic): | |
assignee: | nobody → Rafael David Tinoco (rafaeldtinoco) |
Issues comes from:
(gdb) bt
#0 render (screen_width=144) at ss.c:1204
#1 main (argc=<optimized out>, argv=<optimized out>) at ss.c:4974
render (screen_width=144) at ss.c:1204