Skip to content

Commit f614993

Browse files
m1ndsgregkh
authored andcommitted
batman-adv: fix integer overflow on buff_pos
commit 0799e59 upstream. 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: c6c8fea ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1bfb06e commit f614993

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/batman-adv/bat_iv_ogm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ static void batadv_iv_ogm_send_to_if(struct batadv_forw_packet *forw_packet,
334334
struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
335335
const char *fwd_str;
336336
u8 packet_num;
337-
s16 buff_pos;
337+
int buff_pos;
338338
struct batadv_ogm_packet *batadv_ogm_packet;
339339
struct sk_buff *skb;
340340
u8 *packet_pos;

0 commit comments

Comments
 (0)