Bug 1568333 - Setools does not support sctp protocol
Summary: Setools does not support sctp protocol
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: setools
Version: rawhide
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Vit Mojzis
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-17 08:58 UTC by Vit Mojzis
Modified: 2018-07-24 17:30 UTC (History)
13 users (show)

Fixed In Version: setools-4.1.1-8.1.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-24 17:30:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Vit Mojzis 2018-04-17 08:58:28 UTC
Description of problem:
The following error occurs when creating PortconProtocol object with SCTP:

ValueError: 132 is not a valid PortconProtocol

This causes "sepolicy manpage" to crash when SCTP portcon definitions are used.

Version-Release number of selected component (if applicable):
setools-4.1.1-6

How reproducible:
Try to run build selinux policy containing SCTP portcon definitions.

Steps to Reproduce:
$ fedpkg clone selinux-policy
$ git checkout master
$ fedpkg build

Actual results:
ValueError: 132 is not a valid PortconProtocol

Full traceback:
Traceback (most recent call last):
  File "/usr/bin/sepolicy", line 694, in <module>
    args.func(args)
  File "/usr/bin/sepolicy", line 354, in manpage
    m = ManPage(domain, path, args.root, args.source_files, args.web)
  File "/usr/lib/python3.6/site-packages/sepolicy/manpage.py", line 389, in __init__
    self.portrecs = sepolicy.gen_port_dict()[0]
  File "/usr/lib/python3.6/site-packages/sepolicy/__init__.py", line 842, in gen_port_dict
    for i in info(PORT):
  File "/usr/lib/python3.6/site-packages/sepolicy/__init__.py", line 218, in <genexpr>
    } for x in q.results())
  File "/usr/lib64/python3.6/site-packages/setools/policyrep/netcontext.py", line 186, in protocol
    return PortconProtocol(self.qpol_symbol.protocol(self.policy))
  File "/usr/lib64/python3.6/enum.py", line 291, in __call__
    return cls.__new__(cls, value)
  File "/usr/lib64/python3.6/enum.py", line 533, in __new__
    return cls._missing_(value)
  File "/usr/lib64/python3.6/enum.py", line 546, in _missing_
    raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 132 is not a valid PortconProtocol


Expected results:
Build succeeds.

Additional info:

Comment 3 Fedora Update System 2018-07-23 15:56:03 UTC
setools-4.1.1-8.1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-46d2968906

Comment 4 Fedora Update System 2018-07-23 22:22:43 UTC
setools-4.1.1-8.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-46d2968906

Comment 5 Fedora Update System 2018-07-24 17:30:11 UTC
setools-4.1.1-8.1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.