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:   Sun, 23 Feb 2020 08:46:56 -0800
From:   Craig Robson <craig@...tt.com>
To:     netdev@...r.kernel.org
Subject: Subject: [PATCH net-next] bonding: Fix hashing byte order

Change to use host order bytes when hashing IP address.
---
 drivers/net/bonding/bond_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index fef599eb822b..6f9a0758c54f 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3274,8 +3274,8 @@ u32 bond_xmit_hash(struct bonding *bond, struct
sk_buff *skb)
                hash = bond_eth_hash(skb);
        else
                hash = (__force u32)flow.ports.ports;
-       hash ^= (__force u32)flow_get_u32_dst(&flow) ^
-               (__force u32)flow_get_u32_src(&flow);
+       hash ^= ntohl((__force u32)flow_get_u32_dst(&flow)) ^
+               ntohl((__force u32)flow_get_u32_src(&flow));
        hash ^= (hash >> 16);
        hash ^= (hash >> 8);

-- 
2.24.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ