[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180110.160435.1619552670235238401.davem@davemloft.net>
Date: Wed, 10 Jan 2018 16:04:35 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: m.xhonneux@...il.com
Cc: netdev@...r.kernel.org, dlebrun@...gle.com
Subject: Re: [PATCH net v2] ipv6: sr: fix TLVs not being copied using
setsockopt
From: Mathieu Xhonneux <m.xhonneux@...il.com>
Date: Wed, 10 Jan 2018 13:35:49 +0000
> Function ipv6_push_rthdr4 allows to add an IPv6 Segment Routing Header
> to a socket through setsockopt, but the current implementation doesn't
> copy possible TLVs at the end of the SRH received from userspace.
>
> Therefore, the execution of the following branch if (sr_has_hmac(sr_phdr))
> { ... } will never complete since the len and type fields of a possible
> HMAC TLV are not copied, hence seg6_get_tlv_hmac will return an error,
> and the HMAC will not be computed.
>
> This commit adds a memcpy in case TLVs have been appended to the SRH.
>
> Fixes: a149e7c7ce812561f0fdc7a86ddc42f294e5eb3e ("ipv6: sr: add
> support for SRH injection through setsockopt")
Please do not break up long Fixes: lines. Also, you should only
provide 12 digits of the SHA1 ID.
> Acked-by: David Lebrun <dlebrun@...gle.com>
> Signed-off-by: Mathieu Xhonneux <m.xhonneux@...il.com>
Applied, thanks.
Powered by blists - more mailing lists