]> git.baikalelectronics.ru Git - kernel.git/commit
dcbnl: fix various netlink info leaks
authorMathias Krause <minipli@googlemail.com>
Sat, 9 Mar 2013 05:52:21 +0000 (05:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 10 Mar 2013 09:19:26 +0000 (05:19 -0400)
commit181c16283abdc8e5ae8bdaab37886fbb9952814b
treeb3e9cf667e8f13d15bc2fb76d8f44557a6f65202
parent14be8245f76c8c5fa6f6c6a7bd4661db3608ebb3
dcbnl: fix various netlink info leaks

The dcb netlink interface leaks stack memory in various places:
* perm_addr[] buffer is only filled at max with 12 of the 32 bytes but
  copied completely,
* no in-kernel driver fills all fields of an IEEE 802.1Qaz subcommand,
  so we're leaking up to 58 bytes for ieee_ets structs, up to 136 bytes
  for ieee_pfc structs, etc.,
* the same is true for CEE -- no in-kernel driver fills the whole
  struct,

Prevent all of the above stack info leaks by properly initializing the
buffers/structures involved.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dcb/dcbnl.c