diff options
| author | Sven Eckelmann <sven@narfation.org> | 2026-10-04 10:10:06 +0200 |
|---|---|---|
| committer | Sven Eckelmann <sven@narfation.org> | 2026-10-30 10:11:25 +0100 |
| commit | 4eb19a389d74f06901b4cd6f24b996b2e84eaefc (patch) | |
| tree | 9c138413ecf78b38dee7689d580063d51352674c /rust/kernel | |
| parent | 1025b76d13288a311e8259a0eefde0854fa63c41 (diff) | |
batman-adv: dat: initialize orig_node of unfilled candidate slots
batadv_dat_select_candidates() allocates the candidate array without
zeroing it. batadv_choose_next_candidate() marks each slot as
BATADV_DAT_CANDIDATE_NOT_FOUND but only sets orig_node when an eligible
originator was found. In the following rounds,
batadv_is_orig_node_eligible() compares res[j].orig_node of all previous
slots against the evaluated originator. For slots without candidates, it
reads uninitialized memory.
The orig_node has to be cleared together with the
BATADV_DAT_CANDIDATE_NOT_FOUND type.
Cc: stable@vger.kernel.org
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/bug/linux-b25d9aa4-10bb-427c-a145-ccaadc2a1bb9
Fixes: 785ea1144182 ("batman-adv: Distributed ARP Table - create DHT helper functions")
Acked-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'rust/kernel')
0 files changed, 0 insertions, 0 deletions
