* [PATCH net] tipc: fix a bit overflow in tipc_crypto_key_rcv()
@ 2022-02-11 4:55 Hangyu Hua
2022-02-13 12:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Hangyu Hua @ 2022-02-11 4:55 UTC (permalink / raw)
To: jmaloy, ying.xue, davem, kuba
Cc: netdev, tipc-discussion, linux-kernel, Hangyu Hua
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>
---
net/tipc/crypto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c
index d293614d5fc6..b5074957e881 100644
--- a/net/tipc/crypto.c
+++ b/net/tipc/crypto.c
@@ -2287,7 +2287,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;
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net] tipc: fix a bit overflow in tipc_crypto_key_rcv()
2022-02-11 4:55 [PATCH net] tipc: fix a bit overflow in tipc_crypto_key_rcv() Hangyu Hua
@ 2022-02-13 12:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-02-13 12:20 UTC (permalink / raw)
To: Hangyu Hua
Cc: jmaloy, ying.xue, davem, kuba, netdev, tipc-discussion, linux-kernel
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Fri, 11 Feb 2022 12:55:10 +0800 you wrote:
> 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>
> ---
> net/tipc/crypto.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [net] tipc: fix a bit overflow in tipc_crypto_key_rcv()
https://git.kernel.org/netdev/net/c/143de8d97d79
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-13 12:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11 4:55 [PATCH net] tipc: fix a bit overflow in tipc_crypto_key_rcv() Hangyu Hua
2022-02-13 12:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®