OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b8305f
)
crypto: chtls - dereference null variable
author
Atul Gupta
<atul.gupta@chelsio.com>
Sun, 27 May 2018 15:45:20 +0000
(21:15 +0530)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Wed, 30 May 2018 16:13:59 +0000
(
00:13
+0800)
skb dereferenced before check in sendpage
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Atul Gupta <atul.gupta@chelsio.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/chelsio/chtls/chtls_io.c
patch
|
blob
|
history
diff --git
a/drivers/crypto/chelsio/chtls/chtls_io.c
b/drivers/crypto/chelsio/chtls/chtls_io.c
index
7aa5d90
..
8cfc27b
100644
(file)
--- a/
drivers/crypto/chelsio/chtls/chtls_io.c
+++ b/
drivers/crypto/chelsio/chtls/chtls_io.c
@@
-1230,9
+1230,8
@@
int chtls_sendpage(struct sock *sk, struct page *page,
struct sk_buff *skb = skb_peek_tail(&csk->txq);
int copy, i;
- copy = mss - skb->len;
if (!skb || (ULP_SKB_CB(skb)->flags & ULPCB_FLAG_NO_APPEND) ||
-
copy
<= 0) {
+
(copy = mss - skb->len)
<= 0) {
new_buf:
if (!csk_mem_free(cdev, sk))
goto wait_for_sndbuf;