Bug 1574742

Summary: ipset segfaults when reading port number from /etc/services
Product: [Fedora] Fedora Reporter: Thomas Köller <thomas>
Component: ipsetAssignee: Eric Garver <egarver>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: egarver, kwizart, sbrivio, twoerner
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ipset-6.38-1.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-16 08:06:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Thomas Köller 2018-05-03 23:47:54 UTC
Description of problem:

When ipset uses /etc/services to translate service names to port numbers, a segfault occurs. If the port is given as a numerical value, it works as expected.

[root@sarkovy ~]# ipset create test_set bitmap:port range 0-65535
[root@sarkovy ~]# ipset add test_set tcp:telnet
Segmentation fault (core dumped)
[root@sarkovy ~]# ipset list test_set
Name: test_set
Type: bitmap:port
Revision: 3
Header: range 0-65535
Size in memory: 8268
References: 0
Number of entries: 0
Members:
[root@sarkovy ~]# ipset add test_set tcp:23
[root@sarkovy ~]# ipset list test_set
Name: test_set
Type: bitmap:port
Revision: 3
Header: range 0-65535
Size in memory: 8268
References: 0
Number of entries: 1
Members:
23



Version-Release number of selected component (if applicable):
ipset-6.35-3.fc28.x86_64

How reproducible:
always

Steps to Reproduce:
see above

Actual results:
segfault

Expected results:
no segfault

Additional info:

Comment 1 Thomas Köller 2018-05-04 07:29:45 UTC
Occurred for the first time right after updating f27 to f28, worked before.

Comment 2 Eric Garver 2018-05-04 13:05:47 UTC
Thanks for reporting. I also see this in rawhide.

# ipset create test_set bitmap:port range 0-65535
# ipset add test_set tcp:telnet
Segmentation fault (core dumped)


# yum info ipset
Version      : 6.35
Release      : 3.fc28
Arch         : x86_64

Comment 4 Fedora Update System 2018-08-13 12:56:37 UTC
ipset-6.38-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-67b705f760

Comment 5 Fedora Update System 2018-08-14 22:41:39 UTC
ipset-6.38-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-67b705f760

Comment 6 Fedora Update System 2018-08-16 08:06:38 UTC
ipset-6.38-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.