RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 606889 - Fix enforcement of direction of traffic for rules describing incoming traffic
Summary: Fix enforcement of direction of traffic for rules describing incoming traffic
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-22 16:42 UTC by Stefan Berger
Modified: 2010-11-11 14:50 UTC (History)
7 users (show)

Fixed In Version: libvirt-0_8_1-12_el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-11 14:50:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Stefan Berger 2010-06-22 16:42:32 UTC
Description of problem:

The below patches fix a network filtering / security problem due to network traffic filtering rules not enforcing the direction in which for example a TCP connection is established; also give user control over the enforcement of the direction of the traffic by adding a new attribute to the XML.


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

libvirt-0.8.1-9.el6

Steps to Reproduce:
1. Create an nwfilter containing the following XML fragment:

  [...]
   <rule action='accept' direction='in' priority='500'>
      <tcp dstportstart='22'/>
   </rule>
  [...]

2. Create a VM referencing the nwfilter with above fragment
3. Start the VM
  
Actual results:

A filtering rule for the above will created that looks like this if dumped using iptables -L -n:

[...]
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22
[...]


Expected results:

The rule that we would like to have would be this one here:

[...]
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22 state NEW,ESTABLISHED
[...]

Additional info:

Please add the following two patches in the order shown below -- both apply cleanly to recent -9.

ID                                      ,proposed patch name

2dce970162b3e45c796dfab9da8490c7b18b4533,libvirt-0.8.1-nwfilter-state-match-on-incoming-traffic.patch
51d3fb02768bb10fbba70e9c4466456c0488ced6,libvirt-0.8.1-nwfilter-xml-attribute-for-state-match.patch

[ git log -p -n 1 ${id} > ${patch} ]

Comment 2 RHEL Program Management 2010-06-22 17:13:24 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 5 Dave Allan 2010-06-30 02:13:43 UTC
libvirt-0_8_1-12_el6 has been built in RHEL-6-candidate with the fix.

Dave

Comment 6 dyuan 2010-07-01 09:17:46 UTC
Verified PASSED with libvirt-0.8.1-13.el6.

# cat filter.xml 
<filter name='filter'>
  <rule action='accept' direction='in' priority='500'>
    <tcp dstportstart='22'/>
  </rule>
  </filter>

start VM referencing the nwfilter with above fragment

# iptables -L -n

[...]
Chain FI-vnet0 (1 references)
target     prot opt source               destination         
RETURN     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp spt:22 state ESTABLISHED 

Chain FO-vnet0 (1 references)
target     prot opt source               destination         
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22 state NEW,ESTABLISHED 
[...]

Comment 7 releng-rhel@redhat.com 2010-11-11 14:50:54 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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