[Bridge] [PATCH v2] netfilter: account ebt_table_info to kmemcg

2019-01-02 Thread Shakeel Butt via Bridge
The [ip,ip6,arp]_tables use x_tables_info internally and the underlying memory is already accounted to kmemcg. Do the same for ebtables. The syzbot, by using setsockopt(EBT_SO_SET_ENTRIES), was able to OOM the whole system from a restricted memcg, a potential DoS. By accounting the

Re: [Bridge] [PATCH] netfilter: account ebt_table_info to kmemcg

2019-01-02 Thread Michal Hocko
On Sun 30-12-18 19:59:53, Shakeel Butt wrote: > On Sun, Dec 30, 2018 at 12:00 AM Michal Hocko wrote: > > > > On Sun 30-12-18 08:45:13, Michal Hocko wrote: > > > On Sat 29-12-18 11:34:29, Shakeel Butt wrote: > > > > On Sat, Dec 29, 2018 at 2:06 AM Michal Hocko wrote: > > > > > > > > > > On Sat

Re: [Bridge] [PATCH] netfilter: account ebt_table_info to kmemcg

2019-01-02 Thread Shakeel Butt via Bridge
On Sat, Dec 29, 2018 at 11:45 PM Michal Hocko wrote: > > On Sat 29-12-18 11:34:29, Shakeel Butt wrote: > > On Sat, Dec 29, 2018 at 2:06 AM Michal Hocko wrote: > > > > > > On Sat 29-12-18 10:52:15, Florian Westphal wrote: > > > > Michal Hocko wrote: > > > > > On Fri 28-12-18 17:55:24, Shakeel

Re: [Bridge] [PATCH] netfilter: account ebt_table_info to kmemcg

2019-01-02 Thread Shakeel Butt via Bridge
On Sun, Dec 30, 2018 at 12:00 AM Michal Hocko wrote: > > On Sun 30-12-18 08:45:13, Michal Hocko wrote: > > On Sat 29-12-18 11:34:29, Shakeel Butt wrote: > > > On Sat, Dec 29, 2018 at 2:06 AM Michal Hocko wrote: > > > > > > > > On Sat 29-12-18 10:52:15, Florian Westphal wrote: > > > > > Michal

Re: [Bridge] [PATCH] netfilter: account ebt_table_info to kmemcg

2019-01-02 Thread Michal Hocko
On Sun 30-12-18 08:45:13, Michal Hocko wrote: > On Sat 29-12-18 11:34:29, Shakeel Butt wrote: > > On Sat, Dec 29, 2018 at 2:06 AM Michal Hocko wrote: > > > > > > On Sat 29-12-18 10:52:15, Florian Westphal wrote: > > > > Michal Hocko wrote: > > > > > On Fri 28-12-18 17:55:24, Shakeel Butt wrote:

Re: [Bridge] [PATCH] netfilter: account ebt_table_info to kmemcg

2019-01-02 Thread Michal Hocko
On Sat 29-12-18 11:34:29, Shakeel Butt wrote: > On Sat, Dec 29, 2018 at 2:06 AM Michal Hocko wrote: > > > > On Sat 29-12-18 10:52:15, Florian Westphal wrote: > > > Michal Hocko wrote: > > > > On Fri 28-12-18 17:55:24, Shakeel Butt wrote: > > > > > The [ip,ip6,arp]_tables use x_tables_info

[Bridge] general protection fault in fdb_find_rcu

2019-01-02 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:90cadbbf341d Merge git://git.kernel.org/pub/scm/linux/kern.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=1745c69b40 kernel config: https://syzkaller.appspot.com/x/.config?x=9d41c8529d7e7362

Re: [Bridge] [PATCH] netfilter: account ebt_table_info to kmemcg

2019-01-02 Thread Shakeel Butt via Bridge
Hi Kirill, On Sat, Dec 29, 2018 at 1:52 AM Kirill Tkhai wrote: > > Hi, Michal! > > On 29.12.2018 10:33, Michal Hocko wrote: > > On Fri 28-12-18 17:55:24, Shakeel Butt wrote: > >> The [ip,ip6,arp]_tables use x_tables_info internally and the underlying > >> memory is already accounted to kmemcg.

Re: [Bridge] [PATCH] netfilter: account ebt_table_info to kmemcg

2019-01-02 Thread Shakeel Butt via Bridge
On Sat, Dec 29, 2018 at 2:06 AM Michal Hocko wrote: > > On Sat 29-12-18 10:52:15, Florian Westphal wrote: > > Michal Hocko wrote: > > > On Fri 28-12-18 17:55:24, Shakeel Butt wrote: > > > > The [ip,ip6,arp]_tables use x_tables_info internally and the underlying > > > > memory is already

Re: [Bridge] [PATCH] netfilter: account ebt_table_info to kmemcg

2019-01-02 Thread Michal Hocko
On Sat 29-12-18 10:52:15, Florian Westphal wrote: > Michal Hocko wrote: > > On Fri 28-12-18 17:55:24, Shakeel Butt wrote: > > > The [ip,ip6,arp]_tables use x_tables_info internally and the underlying > > > memory is already accounted to kmemcg. Do the same for ebtables. The > > > syzbot, by using

Re: [Bridge] [PATCH] netfilter: account ebt_table_info to kmemcg

2019-01-02 Thread Kirill Tkhai
Hi, Michal! On 29.12.2018 10:33, Michal Hocko wrote: > On Fri 28-12-18 17:55:24, Shakeel Butt wrote: >> The [ip,ip6,arp]_tables use x_tables_info internally and the underlying >> memory is already accounted to kmemcg. Do the same for ebtables. The >> syzbot, by using

Re: [Bridge] [PATCH] netfilter: account ebt_table_info to kmemcg

2019-01-02 Thread Michal Hocko
On Fri 28-12-18 17:55:24, Shakeel Butt wrote: > The [ip,ip6,arp]_tables use x_tables_info internally and the underlying > memory is already accounted to kmemcg. Do the same for ebtables. The > syzbot, by using setsockopt(EBT_SO_SET_ENTRIES), was able to OOM the > whole system from a restricted

[Bridge] [PATCH] netfilter: account ebt_table_info to kmemcg

2019-01-02 Thread Shakeel Butt via Bridge
The [ip,ip6,arp]_tables use x_tables_info internally and the underlying memory is already accounted to kmemcg. Do the same for ebtables. The syzbot, by using setsockopt(EBT_SO_SET_ENTRIES), was able to OOM the whole system from a restricted memcg, a potential DoS. Reported-by: