]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: mt76: testmode: add nla_policy for MT76_TM_ATTR_TX_LENGTH
authorLin Ma <linma@zju.edu.cn>
Sun, 23 Jul 2023 08:03:50 +0000 (16:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:42:31 +0000 (09:42 +0200)
commitf5f7aa2b6b8f4f8c5449228896db6ba9631ee391
treea7694e9be6095b07cce5c34a400cf969b3680ea7
parentc0ce0fb76610d5fad31f56f2ca8241a2a6717a1b
wifi: mt76: testmode: add nla_policy for MT76_TM_ATTR_TX_LENGTH

[ Upstream commit 74f12d511625e603fac8c0c2b6872e687e56dd61 ]

It seems that the nla_policy in mt76_tm_policy is missed for attribute
MT76_TM_ATTR_TX_LENGTH. This patch adds the correct description to make
sure the

  u32 val = nla_get_u32(tb[MT76_TM_ATTR_TX_LENGTH]);

in function mt76_testmode_cmd() is safe and will not result in
out-of-attribute read.

Fixes: f0efa8621550 ("mt76: add API for testmode support")
Signed-off-by: Lin Ma <linma@zju.edu.cn>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/testmode.c