diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-02-15 17:33:46 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-16 13:13:31 +0300 |
commit | 166c2c8a6a4dc2e4ceba9e10cfe81c3e469e3210 (patch) | |
tree | 6ac5e5691f0c839dac289bc9951fff7b0751427b /drivers/net/ethernet/stmicro | |
parent | 52f671db18823089a02f07efc04efdb2272ddc17 (diff) | |
download | linux-166c2c8a6a4dc2e4ceba9e10cfe81c3e469e3210.tar.xz |
net/sched: act_mirred: don't override retval if we already lost the skb
If we're redirecting the skb, and haven't called tcf_mirred_forward(),
yet, we need to tell the core to drop the skb by setting the retcode
to SHOT. If we have called tcf_mirred_forward(), however, the skb
is out of our hands and returning SHOT will lead to UaF.
Move the retval override to the error path which actually need it.
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Fixes: e5cf1baf92cb ("act_mirred: use TC_ACT_REINSERT when possible")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
0 files changed, 0 insertions, 0 deletions