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-next>] [day] [month] [year] [list]
Message-ID: <20210411081334.1994938-1-roid@nvidia.com>
Date:   Sun, 11 Apr 2021 11:13:34 +0300
From:   Roi Dayan <roid@...dia.com>
To:     <netdev@...r.kernel.org>
CC:     Roi Dayan <roid@...dia.com>,
        Pablo Neira Ayuso <pablo@...filter.org>,
        "Oz Shlomo" <ozsh@...dia.com>, Paul Blakey <paulb@...dia.com>,
        Saeed Mahameed <saeedm@...dia.com>
Subject: [PATCH net-next 1/1] netfilter: flowtable: Make sure dst_cache is valid before using it

It could be dst_cache was not set so check it's not null before using
it.

Fixes: 8b9229d15877 ("netfilter: flowtable: dst_check() from garbage collector path")
Signed-off-by: Roi Dayan <roid@...dia.com>
---
 net/netfilter/nf_flow_table_core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/netfilter/nf_flow_table_core.c b/net/netfilter/nf_flow_table_core.c
index 76573bae6664..e426077aaed1 100644
--- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c
@@ -410,6 +410,8 @@ static bool flow_offload_stale_dst(struct flow_offload_tuple *tuple)
 	if (tuple->xmit_type == FLOW_OFFLOAD_XMIT_NEIGH ||
 	    tuple->xmit_type == FLOW_OFFLOAD_XMIT_XFRM) {
 		dst = tuple->dst_cache;
+		if (!dst)
+			return false;
 		if (!dst_check(dst, tuple->dst_cookie))
 			return true;
 	}
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ