Re: [PATCH net-next v2] net: l2tp: fix reading optional fields of L2TPv3

2019-01-27 Thread Jacob Wen
On 1/25/19 12:01 AM, Guillaume Nault wrote: On Thu, Jan 24, 2019 at 03:49:17PM +0800, Jacob Wen wrote: Use pskb_may_pull() to make sure the optional fields are in skb linear parts, so we can safely read them later. It's easy to reproduce the issue with a net driver that supports paged skb da

Re: [PATCH net-next v2] net: l2tp: fix reading optional fields of L2TPv3

2019-01-24 Thread Guillaume Nault
On Thu, Jan 24, 2019 at 03:49:17PM +0800, Jacob Wen wrote: > Use pskb_may_pull() to make sure the optional fields are in skb linear > parts, so we can safely read them later. > > It's easy to reproduce the issue with a net driver that supports paged > skb data. Just create a L2TPv3 over IP tunnel

[PATCH net-next v2] net: l2tp: fix reading optional fields of L2TPv3

2019-01-23 Thread Jacob Wen
Use pskb_may_pull() to make sure the optional fields are in skb linear parts, so we can safely read them later. It's easy to reproduce the issue with a net driver that supports paged skb data. Just create a L2TPv3 over IP tunnel and then generates some network traffic. Once reproduced, rx err in /