Projects
Mega:24.03:SP1:Everything
nftables
_service:tar_scm:backport-parser_bison-make-sur...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-parser_bison-make-sure-obj_free-releases-timeout-pol.patch of Package nftables
From d5a06af393eaf47571c884a265d1f6e6ba34ed97 Mon Sep 17 00:00:00 2001 From: Florian Westphal <fw@strlen.de> Date: Tue, 12 Dec 2023 10:44:35 +0100 Subject: [PATCH] parser_bison: make sure obj_free releases timeout policies obj_free() won't release them because ->type is still 0 at this point. Init this to CT_TIMEOUT. Signed-off-by: Florian Westphal <fw@strlen.de> --- src/parser_bison.y | 1 + .../shell/testcases/bogons/nft-f/ct_timeout_memleak_objfree | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 tests/shell/testcases/bogons/nft-f/ct_timeout_memleak_objfree diff --git a/src/parser_bison.y b/src/parser_bison.y index 70acfc57..d13fb961 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -2513,6 +2513,7 @@ ct_timeout_block : /*empty */ { $$ = $<obj>-1; init_list_head(&$$->ct_timeout.timeout_list); + $$->type = NFT_OBJECT_CT_TIMEOUT; } | ct_timeout_block common_block | ct_timeout_block stmt_separator diff --git a/tests/shell/testcases/bogons/nft-f/ct_timeout_memleak_objfree b/tests/shell/testcases/bogons/nft-f/ct_timeout_memleak_objfree new file mode 100644 index 00000000..28b1a211 --- /dev/null +++ b/tests/shell/testcases/bogons/nft-f/ct_timeout_memleak_objfree @@ -0,0 +1,5 @@ +table ip filter { + ct timeout cttime { + protocol tcp + l3proto ip + policy = { close : 12s } -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2