mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-23 04:00:20 +00:00
net: fix infoleak in rtnetlink
The stack object “map” has a total size of 32 bytes. Its last 4 bytes are padding generated by compiler. These padding bytes are not initialized and sent out via “nla_put”. Change-Id: I4d8432bef1c67c4f9061f79bd6246852c801269d Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ae306adc03
commit
ee90b7644a
@ -899,14 +899,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
|
||||
goto nla_put_failure;
|
||||
|
||||
if (1) {
|
||||
struct rtnl_link_ifmap map = {
|
||||
.mem_start = dev->mem_start,
|
||||
.mem_end = dev->mem_end,
|
||||
.base_addr = dev->base_addr,
|
||||
.irq = dev->irq,
|
||||
.dma = dev->dma,
|
||||
.port = dev->if_port,
|
||||
};
|
||||
struct rtnl_link_ifmap map;
|
||||
memset(&map, 0, sizeof(map));
|
||||
map.mem_start = dev->mem_start;
|
||||
map.mem_end = dev->mem_end;
|
||||
|
Loading…
Reference in New Issue
Block a user