Problem with 2.6.33-rc1 and insecure flag
Subsystems (2)
I think I figured out the problem.
Apparently the code checked if insecure was set, while it should check if it was NOT set.
Kind regards,
Michael
fs/nfsd/nfsfh.c +1 -1
@@ -89,7 +89,7 @@ static __be32 nfsd_setuser_and_check_port(struct svc_rqst *rqstp,int flags =nfsexp_flags (rqstp, exp);/* Check if the request originated from a secure port. */ -if (!rqstp->rq_secure && (flags &NFSEXP_INSECURE_PORT )) { +if (!rqstp->rq_secure && !(flags &NFSEXP_INSECURE_PORT )) { RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); dprintk(KERN_WARNING "nfsd: request from insecure port %s!\n",
A message that is not in the archive (sent off-list or not yet received): 20091220094625.GA2159-8FIgwK2HfyKMj3X28ACnv+Tv7YV0F9Eg@public.gmane.org
If one were to hit this bug with v4.x, would the error be something like this in the RPC layer:
Reply State: denied (1)
Reject State: AUTH_ERROR (1)
Auth State: bad credential (seal broken) (1)
-Dan
Quoted 38 lines
-----Original Message-----
From: Michael Guntsche [mailto:mike-Z92qn3yYq0hWk0Htik3J/[email protected]]
Sent: Sunday, December 20, 2009 1:46 AM
To: [email protected]
Cc: linux-nfs
Subject: Re: Problem with 2.6.33-rc1 and insecure flagI think I figured out the problem.
Apparently the code checked if insecure was set, while it should check if it was NOT set.
Kind regards,
Michaelfs/nfsd/nfsfh.c +1
-1@@ -89,7 +89,7 @@ static __be32 nfsd_setuser_and_check_port(struct svc_rqst *rqstp, int flags = nfsexp_flags(rqstp, exp);/* Check if the request originated from a secure port. */ -if (!rqstp->rq_secure && (flags &NFSEXP_INSECURE_PORT )) { +if (!rqstp->rq_secure && !(flags &NFSEXP_INSECURE_PORT )) { RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); dprintk(KERN_WARNING"nfsd: request from insecure port %s!\n",
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 7A24DF798E223B4C9864E8F92E8C93EC04EBFD3F-hX7t0kiaRRpT+ZUat5FNkAK/[email protected]
Quoted 6 lines · Daniel
If one were to hit this bug with v4.x, would the error be something like this in the RPC layer:
Reply State: denied (1)
Reject State:AUTH_ERROR(1)
Auth State: bad credential (seal broken) (1)
Since we let the "insecure" flag vary by filesystem, we don't catch this until we decode filehandles, so return an nfs-level error.
--b.
Quoted 42 lines
-Dan
Quoted 38 lines
-----Original Message-----
From: Michael Guntsche [mailto:mike-Z92qn3yYq0hWk0Htik3J/[email protected]]
Sent: Sunday, December 20, 2009 1:46 AM
To: [email protected]
Cc: linux-nfs
Subject: Re: Problem with 2.6.33-rc1 and insecure flagI think I figured out the problem.
Apparently the code checked if insecure was set, while it should check if it was NOT set.
Kind regards,
Michaelfs/nfsd/nfsfh.c +1
-1@@ -89,7 +89,7 @@ static __be32 nfsd_setuser_and_check_port(struct svc_rqst *rqstp, int flags = nfsexp_flags(rqstp, exp);/* Check if the request originated from a secure port. */ -if (!rqstp->rq_secure && (flags &NFSEXP_INSECURE_PORT )) { +if (!rqstp->rq_secure && !(flags &NFSEXP_INSECURE_PORT )) { RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); dprintk(KERN_WARNING"nfsd: request from insecure port %s!\n",
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Michael Guntsche
I think I figured out the problem.
Apparently the code checked if insecure was set, while it should check if it was NOT set.
Thanks! And apologies, I ran across this too a couple days ago, left it in -next, and forgot to send it upstream.... I'll do that now.
--b.
Quoted 20 lines
Kind regards,
Michaelfs/nfsd/nfsfh.c +1
-1@@ -89,7 +89,7 @@ static __be32 nfsd_setuser_and_check_port(struct svc_rqst *rqstp,int flags =nfsexp_flags (rqstp, exp);/* Check if the request originated from a secure port. */ -if (!rqstp->rq_secure && (flags &NFSEXP_INSECURE_PORT )) { +if (!rqstp->rq_secure && !(flags &NFSEXP_INSECURE_PORT )) { RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); dprintk(KERN_WARNING "nfsd: request from insecure port %s!\n",