lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed,  4 May 2016 14:11:24 +0200
From:	Eugene Crosser <Eugene.Crosser@...ibm.com>
To:	crosser@...rage.org, netdev@...r.kernel.org
Subject: [PATCH net] igmp: fix byte order in /proc/net/igmp output

/proc/net/igmp is a readonly attribute that shows multicast groups
to which different network interfaces are subscribed. Among other
things, it displays `multiaddr` which is a 32 bit network-byte-order
field, in hexadecimal format. Prior to this patch, the field was
displayed as an integer, resulting in reverse byte order on little
endian architectures. This patch converts it with ntohl() for display
the same way as this is done for the /proc/net/mcfilter attribute.

The patch changes (corrects) user-visible behaviour.

Signed-off-by: Eugene Crosser <Eugene.Crosser@...ibm.com>
---
 net/ipv4/igmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index b3086cf..f9d2139 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -2722,7 +2722,7 @@ static int igmp_mc_seq_show(struct seq_file *seq, void *v)
 		delta = im->timer.expires - jiffies;
 		seq_printf(seq,
 			   "\t\t\t\t%08X %5d %d:%08lX\t\t%d\n",
-			   im->multiaddr, im->users,
+			   ntohl(im->multiaddr), im->users,
 			   im->tm_running,
 			   im->tm_running ? jiffies_delta_to_clock_t(delta) : 0,
 			   im->reporter);
-- 
2.6.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ