Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1675633 > unrolled thread
| Started by | Matthias Schiffer <mschiffer@universe-factory.net> |
|---|---|
| First post | 2017-06-27 14:50 +0200 |
| Last post | 2017-06-27 20:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH net-next] vxlan: fix incorrect nlattr access in MTU check Matthias Schiffer <mschiffer@universe-factory.net> - 2017-06-27 14:50 +0200
Re: [PATCH net-next] vxlan: fix incorrect nlattr access in MTU check David Miller <davem@davemloft.net> - 2017-06-27 20:50 +0200
| From | Matthias Schiffer <mschiffer@universe-factory.net> |
|---|---|
| Date | 2017-06-27 14:50 +0200 |
| Subject | [PATCH net-next] vxlan: fix incorrect nlattr access in MTU check |
| Message-ID | <tWY6m-xc-21@gated-at.bofh.it> |
The access to the wrong variable could lead to a NULL dereference and
possibly other invalid memory reads in vxlan newlink/changelink requests
with a IFLA_MTU attribute.
Fixes: a985343ba906 "vxlan: refactor verification and application of configuration"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
---
drivers/net/vxlan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 0dafd8e6c665..fd0ff97e3d81 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2727,7 +2727,7 @@ static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[],
}
if (tb[IFLA_MTU]) {
- u32 mtu = nla_get_u32(data[IFLA_MTU]);
+ u32 mtu = nla_get_u32(tb[IFLA_MTU]);
if (mtu < ETH_MIN_MTU || mtu > ETH_MAX_MTU)
return -EINVAL;
--
2.13.2
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-06-27 20:50 +0200 |
| Subject | Re: [PATCH net-next] vxlan: fix incorrect nlattr access in MTU check |
| Message-ID | <tX3IK-4sT-25@gated-at.bofh.it> |
| In reply to | #1675633 |
From: Matthias Schiffer <mschiffer@universe-factory.net> Date: Tue, 27 Jun 2017 14:42:43 +0200 > The access to the wrong variable could lead to a NULL dereference and > possibly other invalid memory reads in vxlan newlink/changelink requests > with a IFLA_MTU attribute. > > Fixes: a985343ba906 "vxlan: refactor verification and application of configuration" > Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> Applied, thanks.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web