diff options
| -rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 7b1ee5a0b03c..73165e9ca5bf 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c | |||
| @@ -855,11 +855,13 @@ unwrap_integ_data(struct svc_rqst *rqstp, struct xdr_buf *buf, u32 seq, struct g | |||
| 855 | return stat; | 855 | return stat; |
| 856 | if (integ_len > buf->len) | 856 | if (integ_len > buf->len) |
| 857 | return stat; | 857 | return stat; |
| 858 | if (xdr_buf_subsegment(buf, &integ_buf, 0, integ_len)) | 858 | if (xdr_buf_subsegment(buf, &integ_buf, 0, integ_len)) { |
| 859 | BUG(); | 859 | WARN_ON_ONCE(1); |
| 860 | return stat; | ||
| 861 | } | ||
| 860 | /* copy out mic... */ | 862 | /* copy out mic... */ |
| 861 | if (read_u32_from_xdr_buf(buf, integ_len, &mic.len)) | 863 | if (read_u32_from_xdr_buf(buf, integ_len, &mic.len)) |
| 862 | BUG(); | 864 | return stat; |
| 863 | if (mic.len > RPC_MAX_AUTH_SIZE) | 865 | if (mic.len > RPC_MAX_AUTH_SIZE) |
| 864 | return stat; | 866 | return stat; |
| 865 | mic.data = kmalloc(mic.len, GFP_KERNEL); | 867 | mic.data = kmalloc(mic.len, GFP_KERNEL); |
| @@ -1611,8 +1613,10 @@ svcauth_gss_wrap_resp_integ(struct svc_rqst *rqstp) | |||
| 1611 | BUG_ON(integ_len % 4); | 1613 | BUG_ON(integ_len % 4); |
| 1612 | *p++ = htonl(integ_len); | 1614 | *p++ = htonl(integ_len); |
| 1613 | *p++ = htonl(gc->gc_seq); | 1615 | *p++ = htonl(gc->gc_seq); |
| 1614 | if (xdr_buf_subsegment(resbuf, &integ_buf, integ_offset, integ_len)) | 1616 | if (xdr_buf_subsegment(resbuf, &integ_buf, integ_offset, integ_len)) { |
| 1615 | BUG(); | 1617 | WARN_ON_ONCE(1); |
| 1618 | goto out_err; | ||
| 1619 | } | ||
| 1616 | if (resbuf->tail[0].iov_base == NULL) { | 1620 | if (resbuf->tail[0].iov_base == NULL) { |
| 1617 | if (resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE > PAGE_SIZE) | 1621 | if (resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE > PAGE_SIZE) |
| 1618 | goto out_err; | 1622 | goto out_err; |
