Commit ffd2dc4c authored by Maher Azzouzi's avatar Maher Azzouzi Committed by Jakub Kicinski
Browse files

net/sched: mqprio: fix stack out-of-bounds write in tc entry parsing



TCA_MQPRIO_TC_ENTRY_INDEX is validated using
NLA_POLICY_MAX(NLA_U32, TC_QOPT_MAX_QUEUE), which allows the value
TC_QOPT_MAX_QUEUE (16). This leads to a 4-byte out-of-bounds stack
write in the fp[] array, which only has room for 16 elements (0–15).

Fix this by changing the policy to allow only up to TC_QOPT_MAX_QUEUE - 1.

Fixes: f62af20b ("net/sched: mqprio: allow per-TC user input of FP adminStatus")
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarMaher Azzouzi <maherazz04@gmail.com>
Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20250802001857.2702497-1-kuba@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 175811b8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment