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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1492160197-13816-1-git-send-email-clg@kaod.org>
Date:   Fri, 14 Apr 2017 10:56:37 +0200
From:   Cédric Le Goater <clg@...d.org>
To:     "David S. Miller" <davem@...emloft.net>
Cc:     Gavin Shan <gwshan@...ux.vnet.ibm.com>,
        Joel Stanley <joel@....id.au>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Cédric Le Goater <clg@...d.org>
Subject: [PATCH] net/ncsi: fix checksum validation in response packet

htonl was used instead of ntohl. Surely a typo.

Signed-off-by: Cédric Le Goater <clg@...d.org>
---
 net/ncsi/ncsi-rsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ncsi/ncsi-rsp.c b/net/ncsi/ncsi-rsp.c
index 087db775b3dc..d375286b79f2 100644
--- a/net/ncsi/ncsi-rsp.c
+++ b/net/ncsi/ncsi-rsp.c
@@ -52,7 +52,7 @@ static int ncsi_validate_rsp_pkt(struct ncsi_request *nr,
 
 	checksum = ncsi_calculate_checksum((unsigned char *)h,
 					   sizeof(*h) + payload - 4);
-	if (*pchecksum != htonl(checksum))
+	if (*pchecksum != ntohl(checksum))
 		return -EINVAL;
 
 	return 0;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ