Bug 1171321

Summary: nftables crashes when trying to add rule to nonexistent chain
Product: [openSUSE] openSUSE Tumbleweed Reporter: Marcus Rückert <mrueckert>
Component: BasesystemAssignee: Jan Engelhardt <jengelh>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Marcus Rückert 2020-05-07 00:41:13 UTC
Core was generated by `nft add rule inet traffic-filter input tcp dport { 22, 80, 443 } accept'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  erec_print (octx=octx@entry=0x55776a4222c0, erec=erec@entry=0x55776a425780, debug_mask=debug_mask@entry=0) at ../../src/erec.c:95
95		switch (indesc->type) {
(gdb) bt
#0  erec_print (octx=octx@entry=0x55776a4222c0, erec=erec@entry=0x55776a425780, debug_mask=debug_mask@entry=0) at ../../src/erec.c:95
#1  0x00007f0eadab847a in erec_print_list (octx=octx@entry=0x55776a4222c0, list=list@entry=0x7ffd930c3ff0, debug_mask=0) at ../../src/erec.c:190
#2  0x00007f0eadac2915 in nft_run_cmd_from_buffer (nft=0x55776a4222a0, buf=<optimized out>) at ../../src/libnftables.c:459
#3  0x0000557769ea68a3 in main (argc=14, argv=<optimized out>) at ../../src/main.c:453
(gdb) l
90		char *pbuf = NULL;
91		unsigned int i, end;
92		FILE *f;
93		int l;
94	
95		switch (indesc->type) {
96		case INDESC_BUFFER:
97		case INDESC_CLI:
98			line = indesc->data;
99			*strchrnul(line, '\n') = '\0';
(gdb) p indesc
$1 = (const struct input_descriptor *) 0x0
(gdb) quit
Comment 3 Swamp Workflow Management 2020-05-07 12:20:06 UTC
This is an autogenerated message for OBS integration:
This bug (1171321) was mentioned in
https://build.opensuse.org/request/show/801122 Factory / nftables
Comment 6 Jan Engelhardt 2022-05-16 21:17:18 UTC
marking as fixed based on rq 801122