net:tap in ubuntu_kselftests_net fails on Noble
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-kernel-tests |
New
|
Undecided
|
Unassigned |
Bug Description
The following issue has been found in net:tap in ubuntu_
8819 14:42:24 DEBUG| [stdout] TAP version 13
8820 14:42:24 DEBUG| [stdout] 1..1
8821 14:42:24 DEBUG| [stdout] # timeout set to 0
8822 14:42:24 DEBUG| [stdout] # selftests: net: tap
8823 14:42:24 DEBUG| [stdout] # TAP version 13
8824 14:42:24 DEBUG| [stdout] # 1..3
8825 14:42:24 DEBUG| [stdout] # # Starting 3 tests from 1 test cases.
8826 14:42:24 DEBUG| [stdout] # # RUN tap.test_
8827 14:42:24 DEBUG| [stdout] # *** buffer overflow detected ***: terminated
8828 14:42:24 DEBUG| [stdout] # # test_packet_
8829 14:42:24 DEBUG| [stdout] # # FAIL tap.test_
8830 14:42:24 DEBUG| [stdout] # not ok 1 tap.test_
8831 14:42:24 DEBUG| [stdout] # # RUN tap.test_
8832 14:42:24 DEBUG| [stdout] # *** buffer overflow detected ***: terminated
8833 14:42:25 DEBUG| [stdout] # # test_packet_
8834 14:42:25 DEBUG| [stdout] # # FAIL tap.test_
8835 14:42:25 DEBUG| [stdout] # not ok 2 tap.test_
8836 14:42:25 DEBUG| [stdout] # # RUN tap.test_
8837 14:42:25 DEBUG| [stdout] # *** buffer overflow detected ***: terminated
8838 14:42:25 DEBUG| [stdout] # # test_packet_
8839 14:42:25 DEBUG| [stdout] # # FAIL tap.test_
8840 14:42:25 DEBUG| [stdout] # not ok 3 tap.test_
8841 14:42:25 DEBUG| [stdout] # # FAILED: 0 / 3 tests passed.
8842 14:42:25 DEBUG| [stdout] # # Totals: pass:0 fail:3 xfail:0 xpass:0 skip:0 error:0
This seems to have emerged with the addition of -D_FORTIFY_SOURCE=3 to the default build flags of gcc in 24.04.
With that flag set, a buffer overflow is detected at strcpy[1], which could (seems to) be a false positive. Unsure if a proper fix would be changing that to memcpy or even understanding gcc's assumptions here 😀
[1]: https:/ /git.launchpad. net/~ubuntu- kernel/ ubuntu/ +source/ linux/+ git/noble/ tree/tools/ testing/ selftests/ net/tap. c?h=Ubuntu- 6.8.0-38. 38#n70