OSDN Git Service

ieee802154: hwsim: fix off-by-one in parse nested
authorAlexander Aring <aring@mojatatu.com>
Thu, 29 Nov 2018 22:41:54 +0000 (17:41 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jan 2019 08:50:57 +0000 (09:50 +0100)
commit537e9a8c301d601da81b3966352dd42dce14a08c
treed4c22e61196b4a3576c69c91975c17178accf7ec
parent083d552a890cb7998395ad92f6aacccd082d8f37
ieee802154: hwsim: fix off-by-one in parse nested

[ Upstream commit a73d4e1490913b76b292f91553b7ba08a65caa3f ]

This patch fixes a off-by-one mistake in nla_parse_nested() functions of
mac802154_hwsim driver. I had to enabled stack protector so I was able
to reproduce it.

Reference: https://github.com/linux-wpan/wpan-tools/issues/17

Signed-off-by: Alexander Aring <aring@mojatatu.com>
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ieee802154/mac802154_hwsim.c