* [PATCH net-next] xfrm6: Fix a offset value for network header in _decode_session6
@ 2015-02-04 14:31 Hajime Tazaki
2015-02-05 23:38 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Hajime Tazaki @ 2015-02-04 14:31 UTC (permalink / raw)
To: netdev; +Cc: steffen.klassert, herbert
When a network-layer header has multiple IPv6 extension headers, then offset
for mobility header goes wrong. This regression breaks an xfrm policy lookup
for a particular receive packet. Binding update packets of Mobile IPv6
are all discarded without this fix.
Fixes: de3b7a06dfe1 ("xfrm6: Fix transport header offset in _decode_session6.")
Signed-off-by: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
---
net/ipv6/xfrm6_policy.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index 48bf5a0..8d2d01b 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -200,6 +200,7 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
#if IS_ENABLED(CONFIG_IPV6_MIP6)
case IPPROTO_MH:
+ offset += ipv6_optlen(exthdr);
if (!onlyproto && pskb_may_pull(skb, nh + offset + 3 - skb->data)) {
struct ip6_mh *mh;
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] xfrm6: Fix a offset value for network header in _decode_session6
2015-02-04 14:31 [PATCH net-next] xfrm6: Fix a offset value for network header in _decode_session6 Hajime Tazaki
@ 2015-02-05 23:38 ` David Miller
2015-02-06 9:16 ` Steffen Klassert
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2015-02-05 23:38 UTC (permalink / raw)
To: tazaki; +Cc: netdev, steffen.klassert, herbert
From: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
Date: Wed, 04 Feb 2015 23:31:10 +0900
> When a network-layer header has multiple IPv6 extension headers, then offset
> for mobility header goes wrong. This regression breaks an xfrm policy lookup
> for a particular receive packet. Binding update packets of Mobile IPv6
> are all discarded without this fix.
>
> Fixes: de3b7a06dfe1 ("xfrm6: Fix transport header offset in _decode_session6.")
> Signed-off-by: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
Steffen, please review and/or integrate into your tree.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] xfrm6: Fix a offset value for network header in _decode_session6
2015-02-05 23:38 ` David Miller
@ 2015-02-06 9:16 ` Steffen Klassert
0 siblings, 0 replies; 3+ messages in thread
From: Steffen Klassert @ 2015-02-06 9:16 UTC (permalink / raw)
To: David Miller; +Cc: tazaki, netdev, herbert
On Thu, Feb 05, 2015 at 03:38:54PM -0800, David Miller wrote:
> From: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
> Date: Wed, 04 Feb 2015 23:31:10 +0900
>
> > When a network-layer header has multiple IPv6 extension headers, then offset
> > for mobility header goes wrong. This regression breaks an xfrm policy lookup
> > for a particular receive packet. Binding update packets of Mobile IPv6
> > are all discarded without this fix.
> >
> > Fixes: de3b7a06dfe1 ("xfrm6: Fix transport header offset in _decode_session6.")
> > Signed-off-by: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
>
> Steffen, please review and/or integrate into your tree.
Now applied to the ipsec tree, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-06 9:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-04 14:31 [PATCH net-next] xfrm6: Fix a offset value for network header in _decode_session6 Hajime Tazaki
2015-02-05 23:38 ` David Miller
2015-02-06 9:16 ` Steffen Klassert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).