lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <DB9PR05MB90784178D27E1ACF9AECD3F18803A@DB9PR05MB9078.eurprd05.prod.outlook.com>
Date: Tue, 25 Jul 2023 07:19:29 +0000
From: Tung Quang Nguyen <tung.q.nguyen@...tech.com.au>
To: Yuanjun Gong <ruc_gongyuanjun@....com>
CC: "jmaloy@...hat.com" <jmaloy@...hat.com>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "ying.xue@...driver.com" <ying.xue@...driver.com>,
	"kuniyu@...zon.com" <kuniyu@...zon.com>
Subject: RE: [PATCH v2 1/1] tipc: check return value of pskb_trim()

>Subject: [PATCH v2 1/1] tipc: check return value of pskb_trim()
>
>goto free_skb if an unexpected result is returned by pskb_tirm() in tipc_crypto_rcv_complete().
>
>Fixes: fc1b6d6de220 ("tipc: introduce TIPC encryption & authentication")
>Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@....com>
>---
> net/tipc/crypto.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c index 577fa5af33ec..302fd749c424 100644
>--- a/net/tipc/crypto.c
>+++ b/net/tipc/crypto.c
>@@ -1960,7 +1960,8 @@ static void tipc_crypto_rcv_complete(struct net *net, struct tipc_aead *aead,
>
> 	skb_reset_network_header(*skb);
> 	skb_pull(*skb, tipc_ehdr_size(ehdr));
>-	pskb_trim(*skb, (*skb)->len - aead->authsize);
>+	if (pskb_trim(*skb, (*skb)->len - aead->authsize))
>+		goto free_skb;
>
> 	/* Validate TIPCv2 message */
> 	if (unlikely(!tipc_msg_validate(skb))) {
>--
>2.17.1
>
Reviewed-by: Tung Nguyen <tung.q.nguyen@...tech.com.au>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ