* [Patch net] geneve: fix an uninitialized value in geneve_changelink()
@ 2020-07-23 1:56 Cong Wang
2020-07-23 12:39 ` Sabrina Dubroca
2020-07-23 22:20 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Cong Wang @ 2020-07-23 1:56 UTC (permalink / raw)
To: netdev; +Cc: Cong Wang, syzbot+7ebc2e088af5e4c0c9fa, Sabrina Dubroca
geneve_nl2info() sets 'df' conditionally, so we have to
initialize it by copying the value from existing geneve
device in geneve_changelink().
Fixes: 56c09de347e4 ("geneve: allow changing DF behavior after creation")
Reported-by: syzbot+7ebc2e088af5e4c0c9fa@syzkaller.appspotmail.com
Cc: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
drivers/net/geneve.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 4661ef865807..dec52b763d50 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -1615,11 +1615,11 @@ static int geneve_changelink(struct net_device *dev, struct nlattr *tb[],
struct netlink_ext_ack *extack)
{
struct geneve_dev *geneve = netdev_priv(dev);
+ enum ifla_geneve_df df = geneve->df;
struct geneve_sock *gs4, *gs6;
struct ip_tunnel_info info;
bool metadata;
bool use_udp6_rx_checksums;
- enum ifla_geneve_df df;
bool ttl_inherit;
int err;
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Patch net] geneve: fix an uninitialized value in geneve_changelink()
2020-07-23 1:56 [Patch net] geneve: fix an uninitialized value in geneve_changelink() Cong Wang
@ 2020-07-23 12:39 ` Sabrina Dubroca
2020-07-23 22:20 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Sabrina Dubroca @ 2020-07-23 12:39 UTC (permalink / raw)
To: Cong Wang; +Cc: netdev, syzbot+7ebc2e088af5e4c0c9fa
2020-07-22, 18:56:25 -0700, Cong Wang wrote:
> geneve_nl2info() sets 'df' conditionally, so we have to
> initialize it by copying the value from existing geneve
> device in geneve_changelink().
>
> Fixes: 56c09de347e4 ("geneve: allow changing DF behavior after creation")
> Reported-by: syzbot+7ebc2e088af5e4c0c9fa@syzkaller.appspotmail.com
> Cc: Sabrina Dubroca <sd@queasysnail.net>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Ouch. Thanks for fixing this.
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
This should only be needed in net/stable. In net-next, I removed this
in commit 9e06e8596bc8 (which will conflict with this patch).
--
Sabrina
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Patch net] geneve: fix an uninitialized value in geneve_changelink()
2020-07-23 1:56 [Patch net] geneve: fix an uninitialized value in geneve_changelink() Cong Wang
2020-07-23 12:39 ` Sabrina Dubroca
@ 2020-07-23 22:20 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-07-23 22:20 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: netdev, syzbot+7ebc2e088af5e4c0c9fa, sd
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Wed, 22 Jul 2020 18:56:25 -0700
> geneve_nl2info() sets 'df' conditionally, so we have to
> initialize it by copying the value from existing geneve
> device in geneve_changelink().
>
> Fixes: 56c09de347e4 ("geneve: allow changing DF behavior after creation")
> Reported-by: syzbot+7ebc2e088af5e4c0c9fa@syzkaller.appspotmail.com
> Cc: Sabrina Dubroca <sd@queasysnail.net>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Applied and queued up for -stable, thanks Cong.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-23 22:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-23 1:56 [Patch net] geneve: fix an uninitialized value in geneve_changelink() Cong Wang
2020-07-23 12:39 ` Sabrina Dubroca
2020-07-23 22:20 ` 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).