Bug 1207942 - /usr/share/selinux/devel/include/system/sysnetwork.if: Syntax error on line ... ' [type=SQUOTE]
Summary: /usr/share/selinux/devel/include/system/sysnetwork.if: Syntax error on line ....
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1207944 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-01 04:07 UTC by Ralf Corsepius
Modified: 2015-12-02 17:48 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-3.13.1-105.11.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-02 10:43:26 UTC
Type: Bug


Attachments (Terms of Use)

Description Ralf Corsepius 2015-04-01 04:07:12 UTC
Description of problem:
# yum update
...
  Updating   : selinux-policy-devel-3.13.1-105.9.fc21.noarch                                                                                                                    29/74 
/usr/share/selinux/devel/include/system/sysnetwork.if: Syntax error on line 263234 ' [type=SQUOTE]
  Updating   : selinux-policy-targeted-3.13.1-105.9.fc21.noarch                                                                                                                 30/74 
...

On a another machine:
# yum update
...
  Updating   : selinux-policy-devel-3.13.1-105.9.fc21.noarch                                                                                                                    29/74 
/usr/share/selinux/devel/include/system/sysnetwork.if: Syntax error on line 263234 ' [type=SQUOTE]
  Updating   : selinux-policy-targeted-3.13.1-105.9.fc21.noarch                                                                                                                 30/74 
...


Version-Release number of selected component (if applicable):
see above.

How reproducible:
No idea.

Comment 1 Ralf Corsepius 2015-04-01 04:08:39 UTC
On a third machine:
...
  Updating   : selinux-policy-devel-3.13.1-105.9.fc21.noarch                                                                                                                      5/64 
/usr/share/selinux/devel/include/system/sysnetwork.if: Syntax error on line 98928 ' [type=SQUOTE]
  Updating   : selinux-policy-targeted-3.13.1-105.9.fc21.noarch                                                                                                                   6/64
...

Comment 2 Lukas Vrabec 2015-04-01 12:02:03 UTC
*** Bug 1207944 has been marked as a duplicate of this bug. ***

Comment 3 Michal Jaegermann 2015-04-01 16:09:15 UTC
Interestingly enough I see the same on a machine with selinux-policy-devel-3.13.1-105.9.fc21 installed but the line in question is consistently 261773.

It is enough to run '/usr/bin/sepolgen-ifgen' to generate this message.

Comment 4 Ralf Corsepius 2015-04-01 17:38:57 UTC
The line number always varies for me [1].

More cases:

4th machine: /usr/share/selinux/devel/include/system/sysnetwork.if: Syntax error on line 83859 ' [type=SQUOTE]

5th machine: /usr/share/selinux/devel/include/system/sysnetwork.if: Syntax error on line 8440 ' [type=SQUOTE]

6th machine:
/usr/share/selinux/devel/include/system/sysnetwork.if: Syntax error on line 83206 ' [type=SQUOTE]

My wild guess would be a leak/overflow somewhere in SELinux.


[1] Seems to me as if I pasted an identical block twice in my initial report, instead of pasting 2 different ones. 
The numbers were different in all cases!

Comment 5 John Mellor 2015-04-01 22:15:02 UTC
On a clean and up-to-date F21 host, the yum update gives:
. . .
  Upgrading   : selinux-policy-devel-3.13.1-105.9.fc21.noarch             27/78 
/usr/share/selinux/devel/include/system/sysnetwork.if: Syntax error on line 8946 ' [type=SQUOTE]
. . .

Comment 6 John Mellor 2015-04-01 22:23:54 UTC
This is the last unquote in the file.  Searching backwards for malformed rules, the sysnet_filetrans_named_content rule at line 1070 (actual fault at line 1091) looks an awful lot like the real problem with mismatched quoting in the new ruleset.

Comment 7 Ralf Corsepius 2015-04-02 06:59:08 UTC
(In reply to John Mellor from comment #6)
> This is the last unquote in the file.  Searching backwards for malformed
> rules, the sysnet_filetrans_named_content rule at line 1070 (actual fault at
> line 1091) looks an awful lot like the real problem with mismatched quoting
> in the new ruleset.

* I am inclined to agree. Seems to me as if the section at line 1087-1090 is bogus/broken (This section originates from policy-f21-base.patch).

Simply removing line 1090 (AFAIU, a stray ")") at least silences the error, but I don't fully understand what I am doing, here :)

* After having removed line "1090" 2 more presumable bugs face up:
# sepolgen-ifgen -d -v
...
Missing interface definition for files_write_all_pid_sockets
Found circular interface class
...

* Also, AFAIS, the "random line numbers" seem to be a defect inside of the parser, which apparently doesn't handle line-numbers correctly.

Comment 8 Lukas Vrabec 2015-04-02 09:06:23 UTC
You are right, this was due to syntax error. My bad, sorry.

I'm going to make new build ASAP.


commit 53ec367ed646bfc9c2bcb5f2952621a81cc49c9f
Author: Lukas Vrabec <lvrabec@redhat.com>
Date:   Thu Apr 2 11:02:35 2015 +0200

    Fix sysnet_filetrans_named_content interface. BZ(1207942)

Comment 9 Fedora Update System 2015-04-02 11:53:41 UTC
selinux-policy-3.13.1-105.11.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/selinux-policy-3.13.1-105.11.fc21

Comment 10 Fedora Update System 2015-04-04 07:22:38 UTC
Package selinux-policy-3.13.1-105.11.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.13.1-105.11.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-5478/selinux-policy-3.13.1-105.11.fc21
then log in and leave karma (feedback).

Comment 11 Sudhir Khanger 2015-04-05 14:43:31 UTC
Installing : selinux-policy-devel-3.13.1-105.9.fc21.noarch                                                                                                 10/16 
/usr/share/selinux/devel/include/system/sysnetwork.if: Syntax error on line 2360 ' [type=SQUOTE]

Looks like there is one more.

Comment 12 John Mellor 2015-04-07 00:04:49 UTC
Since this error and the new related one are stopping selinux from operating correctly, I would think that the priority and severity should both be bumped up to urgent.  This is a severe security issue.

Comment 13 Lukas Vrabec 2015-04-07 14:02:44 UTC
Hi Sudhir, 
Could you please try it with new version package?

Comment 14 Sudhir Khanger 2015-04-08 03:06:52 UTC
Hello Lukas,

No problems with selinux-policy-devel-3.13.1-105.11.fc21.

Thanks,
-Sudhir.

Comment 15 Lukas Vrabec 2015-04-08 12:39:44 UTC
Perfect, 
Thank you!

Comment 16 Fedora End Of Life 2015-11-04 16:02:49 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 17 Fedora End Of Life 2015-12-02 10:43:31 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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