Re: [Bridge] [PATCH] bridge: mrp: Fix out-of-bounds read in br_mrp_parse

2020-05-25 Thread David Miller
From: Horatiu Vultur Date: Mon, 25 May 2020 09:55:41 + > The issue was reported by syzbot. When the function br_mrp_parse was > called with a valid net_bridge_port, the net_bridge was an invalid > pointer. Therefore the check br->stp_enabled could pass/fail > depending where it was pointing

Re: [Bridge] MRP netlink interface

2020-05-25 Thread Michal Kubecek
On Mon, May 25, 2020 at 01:14:35PM +, Horatiu Vultur wrote: > The 05/25/2020 13:26, Nikolay Aleksandrov wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > > content is safe > > > > On 25/05/2020 13:03, Michal Kubecek wrote: > > > On Mon, May 25, 2020 at

Re: [Bridge] MRP netlink interface

2020-05-25 Thread Horatiu Vultur
The 05/25/2020 13:26, Nikolay Aleksandrov wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 25/05/2020 13:03, Michal Kubecek wrote: > > On Mon, May 25, 2020 at 11:28:27AM +, Horatiu Vultur wrote: > > [...] > >> My first approach was

Re: [Bridge] MRP netlink interface

2020-05-25 Thread Nikolay Aleksandrov
On 25/05/2020 13:03, Michal Kubecek wrote: > On Mon, May 25, 2020 at 11:28:27AM +, Horatiu Vultur wrote: > [...] >> My first approach was to extend the 'struct br_mrp_instance' with a field >> that >> contains the priority of the node. But this breaks the backwards >> compatibility, >> and

Re: [Bridge] MRP netlink interface

2020-05-25 Thread Michal Kubecek
On Mon, May 25, 2020 at 11:28:27AM +, Horatiu Vultur wrote: [...] > My first approach was to extend the 'struct br_mrp_instance' with a field that > contains the priority of the node. But this breaks the backwards > compatibility, > and then every time when I need to change something, I will

Re: [Bridge] MRP netlink interface

2020-05-25 Thread Horatiu Vultur
The 05/25/2020 12:33, Nikolay Aleksandrov wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 25/05/2020 14:28, Horatiu Vultur wrote: > > Hi, > > > > While I was working on adding support for MRA role to MRP, I noticed that I > > might

Re: [Bridge] MRP netlink interface

2020-05-25 Thread Nikolay Aleksandrov
On 25/05/2020 14:28, Horatiu Vultur wrote: > Hi, > > While I was working on adding support for MRA role to MRP, I noticed that I > might have some issues with the netlink interface, so it would be great if you > can give me an advice on how to continue. > > First a node with MRA role can behave

[Bridge] MRP netlink interface

2020-05-25 Thread Horatiu Vultur
Hi, While I was working on adding support for MRA role to MRP, I noticed that I might have some issues with the netlink interface, so it would be great if you can give me an advice on how to continue. First a node with MRA role can behave as a MRM(Manager) or as a MRC(Client). The behaviour is

Re: [Bridge] [PATCH] bridge: mrp: Fix out-of-bounds read in br_mrp_parse

2020-05-25 Thread Nikolay Aleksandrov
On 25/05/2020 12:55, Horatiu Vultur wrote: > The issue was reported by syzbot. When the function br_mrp_parse was > called with a valid net_bridge_port, the net_bridge was an invalid > pointer. Therefore the check br->stp_enabled could pass/fail > depending where it was pointing in memory. > The

[Bridge] [PATCH] bridge: mrp: Fix out-of-bounds read in br_mrp_parse

2020-05-25 Thread Horatiu Vultur
The issue was reported by syzbot. When the function br_mrp_parse was called with a valid net_bridge_port, the net_bridge was an invalid pointer. Therefore the check br->stp_enabled could pass/fail depending where it was pointing in memory. The fix consists of setting the net_bridge pointer if the