* [PATCH v2] bonding: correctly handle out of range parameters for lp_interval
@ 2014-03-06 21:53 Sasha Levin
2014-03-06 22:06 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2014-03-06 21:53 UTC (permalink / raw)
To: fubar, vfalico, andy; +Cc: davem, netdev, linux-kernel, nikolay, Sasha Levin
We didn't correctly check cases where the value for lp_interval is not
within the legal range due to a missing table terminator.
This would let userspace trigger a kernel panic by specifying a value out
of range:
echo -1 > /sys/devices/virtual/net/bond0/bonding/lp_interval
Introduced by commit 4325b374f84 ("bonding: convert lp_interval to use
the new option API").
Acked-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/net/bonding/bond_options.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
index 23f3655..4d35cdc 100644
--- a/drivers/net/bonding/bond_options.c
+++ b/drivers/net/bonding/bond_options.c
@@ -124,6 +124,7 @@ static struct bond_opt_value bond_resend_igmp_tbl[] = {
static struct bond_opt_value bond_lp_interval_tbl[] = {
{ "minval", 1, BOND_VALFLAG_MIN | BOND_VALFLAG_DEFAULT},
{ "maxval", INT_MAX, BOND_VALFLAG_MAX},
+ { NULL, -1, 0},
};
static struct bond_option bond_opts[] = {
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] bonding: correctly handle out of range parameters for lp_interval
2014-03-06 21:53 [PATCH v2] bonding: correctly handle out of range parameters for lp_interval Sasha Levin
@ 2014-03-06 22:06 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-03-06 22:06 UTC (permalink / raw)
To: sasha.levin; +Cc: fubar, vfalico, andy, netdev, linux-kernel, nikolay
From: Sasha Levin <sasha.levin@oracle.com>
Date: Thu, 6 Mar 2014 16:53:11 -0500
> We didn't correctly check cases where the value for lp_interval is not
> within the legal range due to a missing table terminator.
>
> This would let userspace trigger a kernel panic by specifying a value out
> of range:
>
> echo -1 > /sys/devices/virtual/net/bond0/bonding/lp_interval
>
> Introduced by commit 4325b374f84 ("bonding: convert lp_interval to use
> the new option API").
>
> Acked-by: Nikolay Aleksandrov <nikolay@redhat.com>
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-06 22:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-06 21:53 [PATCH v2] bonding: correctly handle out of range parameters for lp_interval Sasha Levin
2014-03-06 22:06 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).