Bug 132894 - ipv6 doesn't call sock_unregister() if initialization fails
Summary: ipv6 doesn't call sock_unregister() if initialization fails
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Final
Hardware: Other Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Olaf Kirch
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-09 09:41 UTC by Jesse Michael
Modified: 2005-12-12 10:35 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Proposed patch (684 bytes, patch)
2005-11-10 09:30 UTC, Olaf Kirch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Michael 2005-11-09 09:41:54 UTC
If ipv6 initialization fails (e.g. if CAP_NET_RAW is disabled using the LSM framework), the fail path in inet6_init() doesn't call sock_unregister().

This leaves the AF_INET6 entry in the net_families[] array pointing at outer space and causes any ipv6-aware applications to oops when __sock_create() tries to access net_families[family]->owner.

This was found on 2.6.13-15-default, but the mainline 2.6.14 kernel has the same problem so we should push the fix upstream also.
Comment 1 Olaf Kirch 2005-11-10 09:30:53 UTC
Created attachment 56952 [details]
Proposed patch

This should do the trick. Please test
Comment 2 Olaf Kirch 2005-11-11 10:20:20 UTC
Patches applied to HEAD and 10.0 trees.
Comment 3 Jesse Michael 2005-11-16 07:23:25 UTC
The attached patch worked on my SLES9 SP3 test box and the corresponding 2.6.14 patch I grabbed using a "getpac kernel-default" worked on my SUSE Linux 10.0 box.  
Comment 4 Olaf Kirch 2005-12-12 10:35:50 UTC
Fine, thanks! I also submitted this upstream.