Bug 502822 - OOPS in "inet_select_addr" on ICMP when "icmp_errors_use_inbound_ifaddr" is turned on
Summary: OOPS in "inet_select_addr" on ICMP when "icmp_errors_use_inbound_ifaddr" is t...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.3
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Jiri Pirko
QA Contact: Red Hat Kernel QE team
URL: http://www.mail-archive.com/netdev@vg...
Whiteboard:
Depends On:
Blocks: 526775 533192
TreeView+ depends on / blocked
 
Reported: 2009-05-27 11:17 UTC by Alex/AT
Modified: 2018-10-27 15:09 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 07:44:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed fix (566 bytes, patch)
2009-05-27 11:17 UTC, Alex/AT
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0178 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.5 kernel security and bug fix update 2010-03-29 12:18:21 UTC

Description Alex/AT 2009-05-27 11:17:54 UTC
Created attachment 345596 [details]
Proposed fix

Description of problem:

Kernel occasionally panics in "inet_select_addr" on multihomed host when sending ICMP from ipt_REJECT target when "/proc/sys/net/ipv4/icmp_errors_use_inbound_ifaddr" option is turned on.

More details are here: http://www.mail-archive.com/netdev@vger.kernel.org/msg38276.html

When an inbound interface cannot be determined, ICMP function tries to inet_select_addr with NULL interface pointer. This leads to a panic.

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

Probably any of the RHEL5 kernels, including latest 2.6.18-128.10.1

How reproducible:

Enable "/proc/sys/net/ipv4/icmp_errors_use_inbound_ifaddr" on multihomed host with networks, NAT and lots of iptables rules including REJECT. Create heavy network traffic, including the one matching REJECTs. Wait for a crash.

Actual results:

Kernel panic in "inet_select_addr".

Expected results:

Works okay, packets are sent from zero outgoing address if there is no inbound interface, and routing decides outgoing address for ICMP (right behavior for 2.6.24 and up).

Patch:

I'm attaching code fix backported from latest 2.6.29 (Linus branch). The same code is used in 2.6.24, so we may safely assume it is correct.

Commits fix is found in:
1. http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d8cf27287ac7fb5cbfcc4139917a997c39d841ca
2. http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=6e1d91039becc9d5bcd046d8c709dbaf471220e3

Comment 1 Jiri Pirko 2009-06-03 13:50:11 UTC
I made a test build which includes a backport of fix for this issue. Could you please test it to confirm it fixes the issue. RPMs are here:

http://people.redhat.com/jpirko/test/bz502822/

Let me know if you need RPM for any other arch.

Thanks.

Comment 2 Alex/AT 2009-06-03 13:58:43 UTC
Thanks.

I compiled the 128.1.10 kernel myself, and it works okay for 5 days already. 

So if it is the same backport, we may assume all is OK.

Comment 4 RHEL Program Management 2009-09-25 17:36:17 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 5 Don Zickus 2009-10-06 19:37:48 UTC
in kernel-2.6.18-168.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.

Comment 7 Chris Ward 2010-02-11 10:08:30 UTC
~~ Attention Customers and Partners - RHEL 5.5 Beta is now available on RHN ~~

RHEL 5.5 Beta has been released! There should be a fix present in this 
release that addresses your request. Please test and report back results 
here, by March 3rd 2010 (2010-03-03) or sooner.

Upon successful verification of this request, post your results and update 
the Verified field in Bugzilla with the appropriate value.

If you encounter any issues while testing, please describe them and set 
this bug into NEED_INFO. If you encounter new defects or have additional 
patch(es) to request for inclusion, please clone this bug per each request
and escalate through your support representative.

Comment 10 errata-xmlrpc 2010-03-30 07:44:13 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0178.html

Comment 12 Alex/AT 2014-11-16 17:07:37 UTC
Somehow I have needinfo request for this. Replying just to clear it.


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