Commit 143de8d9 authored by Hangyu Hua's avatar Hangyu Hua Committed by David S. Miller

tipc: fix a bit overflow in tipc_crypto_key_rcv()

msg_data_sz return a 32bit value, but size is 16bit. This may lead to a
bit overflow.
Signed-off-by: default avatarHangyu Hua <hbh25y@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bf8e59fd
......@@ -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);
u16 size = msg_data_sz(hdr);
u32 size = msg_data_sz(hdr);
u8 *data = msg_data(hdr);
unsigned int keylen;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment