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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu,  4 Jun 2015 17:45:50 +0100
From:	Stefan Hajnoczi <stefanha@...hat.com>
To:	linux-nfs@...r.kernel.org
Cc:	Anna Schumaker <anna.schumaker@...app.com>,
	"J. Bruce Fields" <bfields@...ldses.org>,
	Trond Myklebust <trond.myklebust@...marydata.com>,
	asias.hejun@...il.com, netdev@...r.kernel.org,
	Daniel Berrange <berrange@...hat.com>,
	"David S. Miller" <davem@...emloft.net>,
	Stefan Hajnoczi <stefanha@...hat.com>
Subject: [RFC 07/10] SUNRPC: restrict backchannel svc IPPROTO_TCP check to IP

The IPPROTO_TCP check only applies to AF_INET and AF_INET6.

Signed-off-by: Stefan Hajnoczi <stefanha@...hat.com>
---
 net/sunrpc/svc.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 78974e4..1c9c5bc 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -1365,9 +1365,16 @@ bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req,
 	/* reset result send buffer "put" position */
 	resv->iov_len = 0;
 
-	if (rqstp->rq_prot != IPPROTO_TCP) {
-		printk(KERN_ERR "No support for Non-TCP transports!\n");
-		BUG();
+	switch (((struct sockaddr *)&rqstp->rq_addr)->sa_family) {
+	case AF_INET:
+	case AF_INET6:
+		if (rqstp->rq_prot != IPPROTO_TCP) {
+			printk(KERN_ERR "No support for Non-TCP transports!\n");
+			BUG();
+		}
+		break;
+	default:
+		break;
 	}
 
 	/*
-- 
2.4.2

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ