diff options
author | Yotam Gigi <yotam.gi@gmail.com> | 2016-09-26 10:45:26 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-27 13:53:17 (GMT) |
commit | c006da0be033b6ddcd27ee603d0ee01491236642 (patch) | |
tree | eb6f82ecd60bbcea3c16a16809b2272b9147db59 /security/loadpin | |
parent | 4b1d488a285a446329825d5fe91f987b7880e6e5 (diff) | |
download | linux-c006da0be033b6ddcd27ee603d0ee01491236642.tar.xz |
act_ife: Fix false encoding
On ife encode side, the action stores the different tlvs inside the ife
header, where each tlv length field should refer to the length of the
whole tlv (without additional padding) and not just the data length.
On ife decode side, the action iterates over the tlvs in the ife header
and parses them one by one, where in each iteration the current pointer is
advanced according to the tlv size.
Before, the encoding encoded only the data length inside the tlv, which led
to false parsing of ife the header. In addition, due to the fact that the
loop counter was unsigned, it could lead to infinite parsing loop.
This fix changes the loop counter to be signed and fixes the encoding to
take into account the tlv type and size.
Fixes: 28a10c426e81 ("net sched: fix encoding to use real length")
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security/loadpin')
0 files changed, 0 insertions, 0 deletions