Commit e659c96
committed
nx-match: Fix use-after-free parsing matches.
Address pointed by header_ptr might be free'd due to realloc
happened in ofpbuf_put_hex(). Reported by valgrind in the test
379: check TCP flags expression in OXM and NXM.
Invalid write of size 4
nx_match_from_string_raw (nx-match.c:1510)
nx_match_from_string (nx-match.c:1538)
ofctl_parse_nxm__ (ovs-ofctl.c:3325)
ovs_cmdl_run_command (command-line.c:121)
main (ovs-ofctl.c:137)
Address 0x7a2cc40 is 0 bytes inside a block of size 64 free'd
free (vg_replace_malloc.c:530)
ofpbuf_resize__ (ofpbuf.c:246)
ofpbuf_put (ofpbuf.c:386)
ofpbuf_put_hex (ofpbuf.c:414)
nx_match_from_string_raw (nx-match.c:1488)
nx_match_from_string (nx-match.c:1538)
ofctl_parse_nxm__ (ovs-ofctl.c:3325)
Reported-by: William Tu <u9012063@gmail.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>1 parent f3ea2ad commit e659c96
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1468 | 1468 | | |
1469 | 1469 | | |
1470 | 1470 | | |
1471 | | - | |
1472 | 1471 | | |
1473 | 1472 | | |
1474 | 1473 | | |
| |||
1485 | 1484 | | |
1486 | 1485 | | |
1487 | 1486 | | |
1488 | | - | |
| 1487 | + | |
1489 | 1488 | | |
1490 | 1489 | | |
1491 | 1490 | | |
| |||
1508 | 1507 | | |
1509 | 1508 | | |
1510 | 1509 | | |
1511 | | - | |
| 1510 | + | |
1512 | 1511 | | |
1513 | 1512 | | |
1514 | 1513 | | |
| |||
0 commit comments