Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 314893 Details for
Bug 459943
FEAT: kernel: nf_nat: backport NAT port randomisation [rhel-5.3]
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Upstream patch to apply on top of comment #2
0001-nf_nat-use-secure_ipv4_port_ephemeral-for-NAT-por.patch (text/plain), 1.97 KB, created by
Eugene Teo (Security Response)
on 2008-08-25 01:51:26 UTC
(
hide
)
Description:
Upstream patch to apply on top of comment #2
Filename:
MIME Type:
Creator:
Eugene Teo (Security Response)
Created:
2008-08-25 01:51:26 UTC
Size:
1.97 KB
patch
obsolete
>From 9f593653742d1dd816c4e94c6e5154a57ccba6d1 Mon Sep 17 00:00:00 2001 >From: Stephen Hemminger <shemminger@vyatta.com> >Date: Mon, 18 Aug 2008 21:32:32 -0700 >Subject: [PATCH] nf_nat: use secure_ipv4_port_ephemeral() for NAT port randomization > >Use incoming network tuple as seed for NAT port randomization. >This avoids concerns of leaking net_random() bits, and also gives better >port distribution. Don't have NAT server, compile tested only. > >Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> > >[ added missing EXPORT_SYMBOL_GPL ] > >Signed-off-by: Patrick McHardy <kaber@trash.net> >Signed-off-by: David S. Miller <davem@davemloft.net> >--- > drivers/char/random.c | 1 + > net/ipv4/netfilter/nf_nat_proto_common.c | 8 ++++++-- > 2 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/drivers/char/random.c b/drivers/char/random.c >index e0d0e37..1838aa3 100644 >--- a/drivers/char/random.c >+++ b/drivers/char/random.c >@@ -1571,6 +1571,7 @@ u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport) > > return half_md4_transform(hash, keyptr->secret); > } >+EXPORT_SYMBOL_GPL(secure_ipv4_port_ephemeral); > > #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) > u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, >diff --git a/net/ipv4/netfilter/nf_nat_proto_common.c b/net/ipv4/netfilter/nf_nat_proto_common.c >index 91537f1..6c4f11f 100644 >--- a/net/ipv4/netfilter/nf_nat_proto_common.c >+++ b/net/ipv4/netfilter/nf_nat_proto_common.c >@@ -73,9 +73,13 @@ bool nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple, > range_size = ntohs(range->max.all) - min + 1; > } > >- off = *rover; > if (range->flags & IP_NAT_RANGE_PROTO_RANDOM) >- off = net_random(); >+ off = secure_ipv4_port_ephemeral(tuple->src.u3.ip, tuple->dst.u3.ip, >+ maniptype == IP_NAT_MANIP_SRC >+ ? tuple->dst.u.all >+ : tuple->src.u.all); >+ else >+ off = *rover; > > for (i = 0; i < range_size; i++, off++) { > *portptr = htons(min + off % range_size); >-- >1.5.5.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 459943
:
314892
| 314893 |
337289
|
356120