linux/net/batman-adv
Linus Lüssing 9e0b33c221 batman-adv: Fix possible buffer overflow in softif neigh list output
When printing the soft interface table the number of entries in the
softif neigh list are first being counted and a fitting buffer
allocated. After that the softif neigh list gets locked again and
the buffer printed - which has the following two issues:

For one thing, the softif neigh list might have grown when reacquiring
the rcu lock, which results in writing outside of the allocated buffer.
Furthermore 31 Bytes are not enough for printing an entry with a vid
of more than 2 digits.

The manual buffering is unnecessary, we can safely print to the seq
directly during the rcu_read_lock().

Signed-off-by: Linus Lüssing <linus.luessing@ascom.ch>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
2011-03-05 12:50:13 +01:00
..
aggregation.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
aggregation.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
bat_debugfs.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
bat_debugfs.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
bat_sysfs.c batman-adv: Correct rcu refcounting for batman_if 2011-03-05 12:50:07 +01:00
bat_sysfs.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
bitarray.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
bitarray.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
gateway_client.c batman-adv: Increase orig_node refcount before releasing rcu read lock 2011-03-05 12:50:12 +01:00
gateway_client.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
gateway_common.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
gateway_common.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
hard-interface.c batman-adv: Correct rcu refcounting for batman_if 2011-03-05 12:50:07 +01:00
hard-interface.h batman-adv: Correct rcu refcounting for batman_if 2011-03-05 12:50:07 +01:00
hash.c batman-adv: protect each hash row with rcu locks 2011-03-05 12:49:58 +01:00
hash.h batman-adv: protect each hash row with rcu locks 2011-03-05 12:49:58 +01:00
icmp_socket.c batman-adv: Correct rcu refcounting for neigh_node 2011-03-05 12:50:03 +01:00
icmp_socket.h batman-adv: Remove duplicate types.h inclusions 2011-02-11 23:30:29 +01:00
Kconfig
main.c batman-adv: Remove duplicate types.h inclusions 2011-02-11 23:30:29 +01:00
main.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
Makefile batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
originator.c batman-adv: make broadcast seqno operations atomic 2011-03-05 12:50:09 +01:00
originator.h batman-adv: Correct rcu refcounting for neigh_node 2011-03-05 12:50:03 +01:00
packet.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
ring_buffer.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
ring_buffer.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
routing.c batman-adv: make broadcast seqno operations atomic 2011-03-05 12:50:09 +01:00
routing.h batman-adv: protect bonding with rcu locks 2011-03-05 12:50:01 +01:00
send.c batman-adv: Remove duplicate types.h inclusions 2011-02-11 23:30:29 +01:00
send.h batman-adv: Remove duplicate types.h inclusions 2011-02-11 23:30:29 +01:00
soft-interface.c batman-adv: Fix possible buffer overflow in softif neigh list output 2011-03-05 12:50:13 +01:00
soft-interface.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
translation-table.c batman-adv: protect each hash row with rcu locks 2011-03-05 12:49:58 +01:00
translation-table.h batman-adv: Remove duplicate types.h inclusions 2011-02-11 23:30:29 +01:00
types.h batman-adv: Make bat_priv->curr_gw an rcu protected pointer 2011-03-05 12:50:10 +01:00
unicast.c batman-adv: Increase orig_node refcount before releasing rcu read lock 2011-03-05 12:50:12 +01:00
unicast.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
vis.c batman-adv: Correct rcu refcounting for neigh_node 2011-03-05 12:50:03 +01:00
vis.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00