lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190212.112120.214845352415845624.davem@davemloft.net>
Date:   Tue, 12 Feb 2019 11:21:20 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     xiyou.wangcong@...il.com
Cc:     netdev@...r.kernel.org,
        syzbot+4d4af685432dc0e56c91@...kaller.appspotmail.com,
        syzbot+68ee510075cf64260cc4@...kaller.appspotmail.com,
        jiri@...nulli.us, pabeni@...hat.com
Subject: Re: [Patch net] team: avoid complex list operations in
 team_nl_cmd_options_set()

From: Cong Wang <xiyou.wangcong@...il.com>
Date: Mon, 11 Feb 2019 21:59:51 -0800

> The current opt_inst_list operations inside team_nl_cmd_options_set()
> is too complex to track:
> 
>     LIST_HEAD(opt_inst_list);
>     nla_for_each_nested(...) {
>         list_for_each_entry(opt_inst, &team->option_inst_list, list) {
>             if (__team_option_inst_tmp_find(&opt_inst_list, opt_inst))
>                 continue;
>             list_add(&opt_inst->tmp_list, &opt_inst_list);
>         }
>     }
>     team_nl_send_event_options_get(team, &opt_inst_list);
> 
> as while we retrieve 'opt_inst' from team->option_inst_list, it could
> be added to the local 'opt_inst_list' for multiple times. The
> __team_option_inst_tmp_find() doesn't work, as the setter
> team_mode_option_set() still calls team->ops.exit() which uses
> ->tmp_list too in __team_options_change_check().
> 
> Simplify the list operations by moving the 'opt_inst_list' and
> team_nl_send_event_options_get() into the nla_for_each_nested() loop so
> that it can be guranteed that we won't insert a same list entry for
> multiple times. Therefore, __team_option_inst_tmp_find() can be removed
> too.
> 
> Fixes: 4fb0534fb7bb ("team: avoid adding twice the same option to the event list")
> Fixes: 2fcdb2c9e659 ("team: allow to send multiple set events in one message")
> Reported-by: syzbot+4d4af685432dc0e56c91@...kaller.appspotmail.com
> Reported-by: syzbot+68ee510075cf64260cc4@...kaller.appspotmail.com
> Cc: Jiri Pirko <jiri@...nulli.us>
> Cc: Paolo Abeni <pabeni@...hat.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>

Applied and queued up for -stable, thanks Cong.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ