Subject: Re: Stack smash error in latest version of iproute2's 'ip'

From: Stephen Hemminger <[email-masked]>
Date: Mon, 16 Apr 2018 10:00:59 -0700

On Mon, 16 Apr 2018 12:58:00 -0400 (EDT)
Paul Claessen <[email-masked]> wrote:

> Greetings,
> 
> I'm getting a "*** stack smashing detected ***: ip terminated" error when using 'ip macsec show'.
> 
> This happens on Ubuntu 16.04.4 (Xemian) on an AMD64 PC.
> ip version is 180402
> 
> Screen output:
> 
> paul@paulux:~$ ip -V
> ip utility, iproute2-ss180402
> 
> paul@paulux:~$ ip a
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> inet 127.0.0.1/8 scope host lo
> valid_lft forever preferred_lft forever
> inet6 ::1/128 scope host
> valid_lft forever preferred_lft forever
> 2: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
> link/ether 00:21:9b:49:5c:aa brd ff:ff:ff:ff:ff:ff
> 3: enp1s0f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
> link/ether a0:36:9f:20:37:fc brd ff:ff:ff:ff:ff:ff
> 4: enp1s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
> link/ether a0:36:9f:20:37:fe brd ff:ff:ff:ff:ff:ff
> 5: wlxf4ec38845800: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
> link/ether f4:ec:38:84:58:00 brd ff:ff:ff:ff:ff:ff
> inet 10.205.213.28/8 brd 10.255.255.255 scope global dynamic wlxf4ec38845800
> valid_lft 59124sec preferred_lft 59124sec
> inet6 fe80::ea99:1f1b:9ff:1d57/64 scope link
> valid_lft forever preferred_lft forever
> 6: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
> link/ether 02:42:76:15:77:09 brd ff:ff:ff:ff:ff:ff
> inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
> valid_lft forever preferred_lft forever
> 7: macsec0@enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1468 qdisc noqueue state UNKNOWN group default qlen 1000
> link/ether 00:21:9b:49:5c:aa brd ff:ff:ff:ff:ff:ff
> inet 192.168.100.1/24 scope global macsec0
> valid_lft forever preferred_lft forever
> inet6 fe80::221:9bff:fe49:5caa/64 scope link
> valid_lft forever preferred_lft forever
> 
> 
> 
> paul@paulux:~$ ip macsec show
> 7: macsec0: protect on validate strict sc off sa off encrypt on send_sci on end_station off scb off replay off
> cipher suite: GCM-AES-128, using ICV length 16
> TXSC: 000000005caa0001 on SA 0
> 0: PN 45547, state on, key 00000000000000000000000000000000
> RXSC: 00000000778c0001, state on
> 0: PN 3976, state on, key 01000000000000000000000000000000
> *** stack smashing detected ***: ip terminated
> Aborted (core dumped)
> 
> 
> Kind regards,
> 
> ~ Paul Claessen
> 
> 

Probably something in the new code to do JSON output.