diff options
| author | Sven Eckelmann <[email protected]> | 2019-08-22 06:55:36 +0000 |
|---|---|---|
| committer | Simon Wunderlich <[email protected]> | 2019-08-23 16:20:17 +0000 |
| commit | a15d56a60760aa9dbe26343b9a0ac5228f35d445 (patch) | |
| tree | 1db1303a1b1511df243c7f0dd4a0f8a4e3ec245a /tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py | |
| parent | batman-adv: fix uninit-value in batadv_netlink_get_ifindex() (diff) | |
| download | kernel-a15d56a60760aa9dbe26343b9a0ac5228f35d445.tar.gz kernel-a15d56a60760aa9dbe26343b9a0ac5228f35d445.zip | |
batman-adv: Only read OGM tvlv_len after buffer len check
Multiple batadv_ogm_packet can be stored in an skbuff. The functions
batadv_iv_ogm_send_to_if()/batadv_iv_ogm_receive() use
batadv_iv_ogm_aggr_packet() to check if there is another additional
batadv_ogm_packet in the skb or not before they continue processing the
packet.
The length for such an OGM is BATADV_OGM_HLEN +
batadv_ogm_packet->tvlv_len. The check must first check that at least
BATADV_OGM_HLEN bytes are available before it accesses tvlv_len (which is
part of the header. Otherwise it might try read outside of the currently
available skbuff to get the content of tvlv_len.
Fixes: ef26157747d4 ("batman-adv: tvlv - basic infrastructure")
Reported-by: [email protected]
Signed-off-by: Sven Eckelmann <[email protected]>
Acked-by: Antonio Quartulli <[email protected]>
Signed-off-by: Simon Wunderlich <[email protected]>
Diffstat (limited to 'tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py')
0 files changed, 0 insertions, 0 deletions
