Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1672134

Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c

From Jay Vosburgh <jay.vosburgh@canonical.com>
Newsgroups linux.kernel
Subject Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c
Date 2017-06-22 00:40 +0200
Message-ID <tUWs1-46Z-7@gated-at.bofh.it> (permalink)
References <tUVvX-3sm-3@gated-at.bofh.it> <tUVvX-3sm-1@gated-at.bofh.it> <tUVFD-3xy-11@gated-at.bofh.it> <tUVPk-3BI-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


David Miller <davem@davemloft.net> wrote:

>From: Michael D <michael.j.dilmore@gmail.com>
>Date: Wed, 21 Jun 2017 22:41:07 +0100
>
>> I don't think you can stop it being dereferenced... you just need to
>> prevent an attacker from exploiting the null pointer dereference
>> vulnerability right? And this is done by returning the function right
>> away?
>
>What's all of this about an "attacker"?
>
>If there is a bug, we dererence a NULL pointer, and we should
>fix that bug.
>
>The BUG_ON() helps us see where the problem is while at the
>same time stopping the kernel before the NULL deref happens.

	Looking at the code more carefully than I did earlier, the only
way the BUG_ON will hit is if the rx_handler_data is NULL for a bonding
slave when this code executes.

	This should be impossible, as there doesn't appear to be any way
to get into bond_option_active_slave_set for a slave prior to
bond_enslave registering the rx_handler for that slave, as these
operations are mutexed by RTNL.

	-J

---
	-Jay Vosburgh, jay.vosburgh@canonical.com

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] Convert BUG_ON to WARN_ON in bond_options.c Michael J Dilmore <michael.j.dilmore@gmail.com> - 2017-06-21 20:10 +0200
  Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c Jay Vosburgh <jay.vosburgh@canonical.com> - 2017-06-21 20:40 +0200
    Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c David Miller <davem@davemloft.net> - 2017-06-21 23:40 +0200
      Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c Michael D <michael.j.dilmore@gmail.com> - 2017-06-21 23:50 +0200
        Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c David Miller <davem@davemloft.net> - 2017-06-22 00:00 +0200
          Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c Michael J Dilmore <michael.j.dilmore@gmail.com> - 2017-06-22 00:30 +0200
            Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c Jay Vosburgh <jay.vosburgh@canonical.com> - 2017-06-22 00:40 +0200
              Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c Michael J Dilmore <michael.j.dilmore@gmail.com> - 2017-06-22 01:10 +0200
                Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c Michal Kubecek <mkubecek@suse.cz> - 2017-06-22 10:10 +0200
              Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c Bjørn Mork <bjorn@mork.no> - 2017-06-22 10:20 +0200
          Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c Jay Vosburgh <jay.vosburgh@canonical.com> - 2017-06-22 00:40 +0200
        Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c David Miller <davem@davemloft.net> - 2017-06-22 00:00 +0200
    Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c Michael D <michael.j.dilmore@gmail.com> - 2017-06-21 23:40 +0200

csiph-web