Possible parsing bug when -xx is passed on systems with virtual interfaces
Dmitry V. Levin
ldv at altlinux.org
Sat May 7 07:04:20 UTC 2022
On Sat, May 07, 2022 at 09:31:30AM +0300, Sulaiman AlIbrahim سليمان الإبراهيم wrote:
> I'm using strace on a system with active virtual network devices. I noticed that strace reliably fails the moment a traced program attempts to access the network when I pass the -xx flag. strace prints the following message:
>
> strace: sprint_ifname: got unexpected return value 66 for snprintf(buf, 38, ("if_nametoindex(\"" "%s" "\")"), name_quoted)
>
> The following steps should reproduce this issue in a fresh Debian 11 environment:
>
> 1. Ensure `strace`, `iproute2`, and `whois` are installed
> 2. Setup a new virtual Ethernet pair: `ip link add name testi0 type veth peer name testo0`
> 3. Bring both interfaces up: `ip link set testi0 up; ip link set testo0 up;`
> 4. Run whois through strace: `strace -f -xx whois example.com`
>
> I want to note that strace works as expected if -xx is removed. I believe the issue might be caused by the presence of additional peer segments in the name of the veth devices (the '@...' in `testi0 at testo0` and `testo0 at testi0`).
>
> Apologies if this is a known issue.
Yes, this was fixed in strace 5.15, the current strace release is 5.17,
please consider updating.
--
ldv
More information about the Strace-devel
mailing list