Commit 74c2531
authored
[mle] handle invalid leader mask in HandleAddressSolicitResponse (openthread#13063)
This commit resolves an issue in HandleAddressSolicitResponse where
a malformed or invalid leader-supplied Router ID Mask omitting the
leader ID could trigger an assertion.
When a node receives an Address Solicit Response, it installs the new
router ID mask. If the leader's router ID is missing from the mask,
the Router entry for the leader is removed from the local router table.
Subsequently, when the node tries to ensure it has a valid next hop
and cost towards the leader, `mRouterTable.GetLeader()` returns `nullptr`,
leading to an `OT_ASSERT(leader != nullptr)` failure or a null-pointer
write when assertions are disabled.
This is resolved by safely verifying that the leader's router ID is
indeed present in the received router ID mask before applying the
routing update, ensuring `GetLeader()` is guaranteed to find it.1 parent 6954667 commit 74c2531
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3363 | 3363 | | |
3364 | 3364 | | |
3365 | 3365 | | |
| 3366 | + | |
3366 | 3367 | | |
3367 | 3368 | | |
3368 | 3369 | | |
| |||
0 commit comments