mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
batman-adv: fix integer overflow on buff_pos
Fixing an integer overflow present in batadv_iv_ogm_send_to_if. The size
check is done using the int type in batadv_iv_ogm_aggr_packet whereas the
buff_pos variable uses the s16 type. This could lead to an out-of-bound
read.
Cc: stable@vger.kernel.org
Fixes: c6c8fea297 ("net: Add batman-adv meshing protocol")
Signed-off-by: Lyes Bourennani <lbourennani@fuzzinglabs.com>
Signed-off-by: Alexis Pinson <apinson@fuzzinglabs.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
parent
1f5ffc6721
commit
0799e59436
|
|
@ -335,7 +335,7 @@ static void batadv_iv_ogm_send_to_if(struct batadv_forw_packet *forw_packet,
|
|||
struct batadv_priv *bat_priv = netdev_priv(hard_iface->mesh_iface);
|
||||
const char *fwd_str;
|
||||
u8 packet_num;
|
||||
s16 buff_pos;
|
||||
int buff_pos;
|
||||
struct batadv_ogm_packet *batadv_ogm_packet;
|
||||
struct sk_buff *skb;
|
||||
u8 *packet_pos;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user