Skip to content

Commit 143de8d

Browse files
HBh25Ydavem330
authored andcommitted
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: Hangyu Hua <hbh25y@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent bf8e59f commit 143de8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/tipc/crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2276,7 +2276,7 @@ static bool tipc_crypto_key_rcv(struct tipc_crypto *rx, struct tipc_msg *hdr)
22762276
struct tipc_crypto *tx = tipc_net(rx->net)->crypto_tx;
22772277
struct tipc_aead_key *skey = NULL;
22782278
u16 key_gen = msg_key_gen(hdr);
2279-
u16 size = msg_data_sz(hdr);
2279+
u32 size = msg_data_sz(hdr);
22802280
u8 *data = msg_data(hdr);
22812281
unsigned int keylen;
22822282

0 commit comments

Comments
 (0)