summaryrefslogtreecommitdiff
path: root/net/batman-adv/hard-interface.c
diff options
context:
space:
mode:
authorLinus Lüssing <linus.luessing@ascom.ch>2011-02-18 12:20:13 (GMT)
committerMarek Lindner <lindner_marek@yahoo.de>2011-03-05 11:50:13 (GMT)
commit9e0b33c221f1364e4d7562177a918eef8e85317a (patch)
tree817088eeeecc694cf9ad06a563321b2d11f2f0cd /net/batman-adv/hard-interface.c
parent43c70ad5ce5691cce24dae6610731694c0f3fcc8 (diff)
downloadlinux-9e0b33c221f1364e4d7562177a918eef8e85317a.tar.xz
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>
Diffstat (limited to 'net/batman-adv/hard-interface.c')
0 files changed, 0 insertions, 0 deletions