]> git.ipfire.org Git - thirdparty/iproute2.git/commit
bond: fix stack smash in xstats
authorStephen Hemminger <stephen@networkplumber.org>
Thu, 26 Jun 2025 13:50:17 +0000 (06:50 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Thu, 26 Jun 2025 21:52:54 +0000 (14:52 -0700)
commitede5e0b67c13d6d8fb51891d7d4be330733862cd
tree514df695d196bfd3ffcc18b348713c8190625598
parentd30f38d5d752abe12174b1ea05707bcf86f3d305
bond: fix stack smash in xstats

Building with stack smashing detection finds an off by one
in the bond xstats attribute parsing.

$ ip link xstats type bond dev bond0
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
bond0
                    LACPDU Rx 0
                    LACPDU Tx 0
                    LACPDU Unknown type Rx 0
                    LACPDU Illegal Rx 0
                    Marker Rx 0
                    Marker Tx 0
                    Marker response Rx 0
                    Marker response Tx 0
                    Marker unknown type Rx 0
*** stack smashing detected ***: terminated

Program received signal SIGABRT, Aborted.

Reported-by: z30015464 <zhongxuan2@huawei.com>
Fixes: 440c5075d662 ("ip: bond: add xstats support")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
ip/iplink_bond.c