-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qubes-firewall crashed parsing conntrack output #9760
qubes-firewall crashed parsing conntrack output #9760
Comments
Indeed this looks to be a bad idea here... |
On a more generic approach, that service could use automatic restart on failure |
The universal qubes fix! I just noticed this as my qubes-firewall table in sys-firewall stopped updating a week or so ago - been twiddling nftables manually since - not knowing how it was supposed to work. int() got 4conntrack in my case... |
Two users in a week or so is less rare than I feared! I can send a PR this week for at least the stderr thing. I first restarted just the service ( |
conntrack generally prints a status message to stderr before exiting, which interferes with listing connections. Output from dropping connections was unused. Fixes QubesOS/qubes-issues#9760
For interest: I started by logging lines containing "conntrack" in |
* origin/pr/553: qubes-firewall: Suppress extraneous conntrack output Pull request description: conntrack generally prints a status message to stderr before exiting, which interferes with listing connections. Output from dropping connections was unused. Testing: developed within my `sys-firewall`, verified that `conntrack_get_connections` no longer observes lines containing "conntrack", and that connection dropping still works. Fixes QubesOS/qubes-issues#9760
conntrack generally prints a status message to stderr before exiting, which interferes with listing connections. Output from dropping connections was unused. Fixes QubesOS/qubes-issues#9760 (cherry picked from commit d8fb353)
Automated announcement from builder-github The package
|
Automated announcement from builder-github The component
|
Automated announcement from builder-github The package
|
Automated announcement from builder-github The component
|
Automated announcement from builder-github The component
|
Automated announcement from builder-github The package
|
Automated announcement from builder-github The component
|
Automated announcement from builder-github The package
|
Automated announcement from builder-github The package
|
Automated announcement from builder-github The package
|
Automated announcement from builder-github The component
|
Automated announcement from builder-github The component
|
Qubes OS release
Qubes OS 4.2
Brief summary
Yesterday I was editing some firewall rules, then later noticed that newly launched qubes were unable to reach the internet. I discovered that the qubes-firewall service had crashed.
Steps to reproduce
Expected behavior
Firewall keeps updating as rules are changed and new qubes are started.
Actual behavior
qubes-firewall crashed: found in sys-firewall
journalctl -u qubes-firewall.service
Additional information
If I followed the code correctly, it seems like qubes-firewall must have read
dport=5conntrack
in the output ofconntrack
. The only place "conntrack" normally appears in the output ofconntrack
is in the messageconntrack v1.4.7 (conntrack-tools): ...
printed to stderr before exiting. So that message probably ended up interleaved with normal output such asdport=53
.Two things look suspicious to me, and I'd be happy to change them if desired:
stderr=subprocess.STDOUT
combines stderr with stdout - but that risks interleaving like this, and probably nothing printed to stderr is usefully parseable anyway.int()
call has no ValueError handling - although a better handling isn't entirely obvious.The text was updated successfully, but these errors were encountered: