diff options
-rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 9 | ||||
-rw-r--r-- | net/sunrpc/svc.c | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 481f984e9a22..5905d56737d6 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c | |||
@@ -1146,7 +1146,7 @@ svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp) | |||
1146 | case RPC_GSS_SVC_INTEGRITY: | 1146 | case RPC_GSS_SVC_INTEGRITY: |
1147 | if (unwrap_integ_data(&rqstp->rq_arg, | 1147 | if (unwrap_integ_data(&rqstp->rq_arg, |
1148 | gc->gc_seq, rsci->mechctx)) | 1148 | gc->gc_seq, rsci->mechctx)) |
1149 | goto auth_err; | 1149 | goto garbage_args; |
1150 | /* placeholders for length and seq. number: */ | 1150 | /* placeholders for length and seq. number: */ |
1151 | svc_putnl(resv, 0); | 1151 | svc_putnl(resv, 0); |
1152 | svc_putnl(resv, 0); | 1152 | svc_putnl(resv, 0); |
@@ -1154,7 +1154,7 @@ svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp) | |||
1154 | case RPC_GSS_SVC_PRIVACY: | 1154 | case RPC_GSS_SVC_PRIVACY: |
1155 | if (unwrap_priv_data(rqstp, &rqstp->rq_arg, | 1155 | if (unwrap_priv_data(rqstp, &rqstp->rq_arg, |
1156 | gc->gc_seq, rsci->mechctx)) | 1156 | gc->gc_seq, rsci->mechctx)) |
1157 | goto auth_err; | 1157 | goto garbage_args; |
1158 | /* placeholders for length and seq. number: */ | 1158 | /* placeholders for length and seq. number: */ |
1159 | svc_putnl(resv, 0); | 1159 | svc_putnl(resv, 0); |
1160 | svc_putnl(resv, 0); | 1160 | svc_putnl(resv, 0); |
@@ -1169,6 +1169,11 @@ svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp) | |||
1169 | ret = SVC_OK; | 1169 | ret = SVC_OK; |
1170 | goto out; | 1170 | goto out; |
1171 | } | 1171 | } |
1172 | garbage_args: | ||
1173 | /* Restore write pointer to its original value: */ | ||
1174 | xdr_ressize_check(rqstp, reject_stat); | ||
1175 | ret = SVC_GARBAGE; | ||
1176 | goto out; | ||
1172 | auth_err: | 1177 | auth_err: |
1173 | /* Restore write pointer to its original value: */ | 1178 | /* Restore write pointer to its original value: */ |
1174 | xdr_ressize_check(rqstp, reject_stat); | 1179 | xdr_ressize_check(rqstp, reject_stat); |
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 090af78d68b5..7efb5133eb71 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -921,8 +921,7 @@ svc_process(struct svc_rqst *rqstp) | |||
921 | case SVC_OK: | 921 | case SVC_OK: |
922 | break; | 922 | break; |
923 | case SVC_GARBAGE: | 923 | case SVC_GARBAGE: |
924 | rpc_stat = rpc_garbage_args; | 924 | goto err_garbage; |
925 | goto err_bad; | ||
926 | case SVC_SYSERR: | 925 | case SVC_SYSERR: |
927 | rpc_stat = rpc_system_err; | 926 | rpc_stat = rpc_system_err; |
928 | goto err_bad; | 927 | goto err_bad; |