Thread (3 messages) 3 messages, 3 authors, 2020-06-30

Re: [PATCH][next] net/tls: fix sign extension issue when left shifting u16 value

From: David Miller <davem@davemloft.net>
Date: 2020-06-30 20:37:15
Also in: kernel-janitors, lkml

From: Colin King <redacted>
Date: Tue, 30 Jun 2020 15:27:46 +0100
From: Colin Ian King <redacted>

Left shifting the u16 value promotes it to a int and then it
gets sign extended to a u64.  If len << 16 is greater than 0x7fffffff
then the upper bits get set to 1 because of the implicit sign extension.
Fix this by casting len to u64 before shifting it.

Addresses-Coverity: ("integer handling issues")
Fixes: ed9b7646b06a ("net/tls: Add asynchronous resync")
Signed-off-by: Colin Ian King <redacted>
Applied, thanks Colin.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help