Page MenuHomePhabricator

review /etc/xen/vif-route-qubes impact on Qubes-Whonix Firewall
Closed, ResolvedPublic

Details

Impact
High

Event Timeline

Patrick raised the priority of this task from to High.
Patrick updated the task description. (Show Details)
Patrick set Impact to High.
Patrick added subscribers: Patrick, marmarek, nrgaway.

Depending what you mean by "interfere". In terms of rules itself - as
long as Whonix doesn't use "raw" table (I guess it doesn't), it
shouldn't be a problem. But some race condition making either of
iptables-restore call fail may be possible.
Theoretically iptables-restore is used instead of iptables exactly
to prevent such problem
(https://github.com/QubesOS/qubes-issues/issues/42), but it isn't clear
to me that it is really effective. We have flock in vif-route-qubes
because of this uncertainty. Maybe iptables --wait would be a better
option - now it is available in Debian too (>=jessie). But according to
iptables sources, I think iptables --wait still could race against
iptables-restore - the later doesn't use any locking.

What is Debian solution for such problem (different programs/startup
scripts adding iptables rules simultaneously)? The Fedora way is to use
firewalld...

marmarek (Marek Marczykowski-Górecki):

Depending what you mean by "interfere".

I mean by "interfere" here:
"Somehow loading firewall rules inappropriate to Whonix that could in
worst case lead to leaks."

as
long as Whonix doesn't use "raw" table (I guess it doesn't)

Whonix doesn't use the "raw" table indeed.

What is Debian solution for such problem (different programs/startup
scripts adding iptables rules simultaneously)?

Dunno if there is...

Asked on debian-users mailing list:
"Are there packages that modify iptables rules?"
https://lists.debian.org/debian-user/2015/11/msg00416.html

Answer for now:
fail2ban
miniupnpd

Asked a follow up question on debian-users mailing list:
"How do packages that modify iptables rules prevent race conditions?"
https://lists.debian.org/debian-user/2015/11/msg00418.html

Whonix doesn't use the "raw" table indeed.

So I think it is safe.

Asked a follow up question on debian-users mailing list:
"How do packages that modify iptables rules prevent race conditions?"
https://lists.debian.org/debian-user/2015/11/msg00418.html

But the answer for this question would be helpful for bugs like this:
https://github.com/QubesOS/qubes-issues/issues/1067
https://github.com/QubesOS/qubes-issues/issues/740

In T426#7104, @marmarek wrote:

Asked a follow up question on debian-users mailing list:
"How do packages that modify iptables rules prevent race conditions?"
https://lists.debian.org/debian-user/2015/11/msg00418.html

But the answer for this question would be helpful for bugs like this:
https://github.com/QubesOS/qubes-issues/issues/1067
https://github.com/QubesOS/qubes-issues/issues/740

There have been some answers.

Patrick assigned this task to marmarek.

Thank you, Marek! Done. Closing.