Page 1 of 1

Bug in /usr/sbin/lfd sub connectiontracking

Posted: 29 Aug 2024, 10:11
by vgstudios
Bug in /usr/sbin/lfd sub connectiontracking

The hex2ip function strips leading zeros.
However for the string passed to inet_ntoa it simply strips the double colons, forgetting about the leading zeros.

This e.g. results in wrong ipv4 address for ipv4 connections on tcp6 sockets.

Example that goes wrong:
"0000000000000000FFFF0000CE0ACB74" -> "0:0:0:0:0:ffff:74cb:ace" -> "7.76.186.206"
correct would have been "116.203.10.206"

You might also want to check if a similar bug is in other places in the code (I did not check that).

Edit: Same bug is in sub processtracking.

Re: Bug in /usr/sbin/lfd sub connectiontracking

Posted: 29 Aug 2024, 12:04
by ForumAdmin
Thank you for discovering and reporting this. We'll have a fix out in a few minutes

Re: Bug in /usr/sbin/lfd sub connectiontracking

Posted: 29 Aug 2024, 16:02
by vgstudios
Thank you very much for fixing it :-)