OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf8e59f
)
tipc: fix a bit overflow in tipc_crypto_key_rcv()
author
Hangyu Hua
<hbh25y@gmail.com>
Fri, 11 Feb 2022 04:55:10 +0000
(12:55 +0800)
committer
David S. Miller
<davem@davemloft.net>
Sun, 13 Feb 2022 12:12:25 +0000
(12:12 +0000)
msg_data_sz return a 32bit value, but size is 16bit. This may lead to a
bit overflow.
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/crypto.c
patch
|
blob
|
history
diff --git
a/net/tipc/crypto.c
b/net/tipc/crypto.c
index
9325479
..
f09316a
100644
(file)
--- a/
net/tipc/crypto.c
+++ b/
net/tipc/crypto.c
@@
-2276,7
+2276,7
@@
static bool tipc_crypto_key_rcv(struct tipc_crypto *rx, struct tipc_msg *hdr)
struct tipc_crypto *tx = tipc_net(rx->net)->crypto_tx;
struct tipc_aead_key *skey = NULL;
u16 key_gen = msg_key_gen(hdr);
- u
16
size = msg_data_sz(hdr);
+ u
32
size = msg_data_sz(hdr);
u8 *data = msg_data(hdr);
unsigned int keylen;