Repository navigation
Commit 6934fd6
ovs-ofctl: Fix crash with control message errors.
When a bundle transaction fails with multiple errors,
bundle_print_errors() crashes with SIGSEGV if an error's XID doesn't
match any request in the requests list.
This happens because LIST_FOR_EACH_CONTINUE sets bmsg to NULL when it
exhausts the list without finding a match. On the next error iteration,
the list evaluation crashes with a NULL pointer dereference.
Control message errors (TIMEOUT for OPEN_REQUEST, BAD_ID for COMMIT,
etc...) have XIDs that never match entries in the requests list.
When the bundle times out and a subsequent error is triggered, both
errors are collected, triggering the crash.
Fix by checking if bmsg is NULL before entering the inner loop.
The existing fallback to the truncated payload from the error itself
handles the non-matching case correctly.
Fixes: d456608 ("list: use multi-variable helpers for list loops.")
Reported-at: https://redhat.atlassian.net/browse/FDP-4392
Acked-by: Eelco Chaudron <echaudron@ovn.org>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>1 parent 6b07ea1 commit 6934fd6
1 file changed
Lines changed: 15 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
763 | 763 | | |
764 | 764 | | |
765 | 765 | | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
778 | 781 | | |
779 | 782 | | |
780 | 783 | | |
| |||
0 commit comments