Repository navigation
Commit 5038517
netfilter: ipset: fix suspicious RCU usage in find_set_and_id
find_set_and_id() is called when the NFNL_SUBSYS_IPSET mutex is held.
However, in the error path there can be a follow-up recvmsg() without
the mutex held. Use the start() function of struct netlink_dump_control
instead of dump() to verify and report if the specified set does not
exist.
Thanks to Pablo Neira Ayuso for helping me to understand the subleties
of the netlink protocol.
Reported-by: syzbot+fc69d7cb21258ab4ae4d@syzkaller.appspotmail.com
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>1 parent 44efc78 commit 5038517
1 file changed
Lines changed: 21 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1483 | 1483 | | |
1484 | 1484 | | |
1485 | 1485 | | |
1486 | | - | |
| 1486 | + | |
1487 | 1487 | | |
1488 | 1488 | | |
1489 | 1489 | | |
1490 | 1490 | | |
1491 | 1491 | | |
| 1492 | + | |
| 1493 | + | |
1492 | 1494 | | |
1493 | | - | |
1494 | 1495 | | |
1495 | 1496 | | |
1496 | 1497 | | |
1497 | 1498 | | |
1498 | 1499 | | |
1499 | 1500 | | |
1500 | | - | |
| 1501 | + | |
1501 | 1502 | | |
1502 | 1503 | | |
1503 | 1504 | | |
| 1505 | + | |
1504 | 1506 | | |
1505 | 1507 | | |
1506 | 1508 | | |
1507 | 1509 | | |
1508 | | - | |
1509 | | - | |
1510 | | - | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
1511 | 1514 | | |
1512 | 1515 | | |
1513 | 1516 | | |
| |||
1523 | 1526 | | |
1524 | 1527 | | |
1525 | 1528 | | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
1526 | 1536 | | |
1527 | 1537 | | |
1528 | 1538 | | |
1529 | | - | |
| 1539 | + | |
1530 | 1540 | | |
1531 | 1541 | | |
1532 | 1542 | | |
| |||
1537 | 1547 | | |
1538 | 1548 | | |
1539 | 1549 | | |
1540 | | - | |
1541 | | - | |
1542 | | - | |
1543 | | - | |
1544 | | - | |
1545 | | - | |
1546 | | - | |
1547 | | - | |
1548 | | - | |
1549 | | - | |
1550 | | - | |
1551 | | - | |
| 1550 | + | |
| 1551 | + | |
1552 | 1552 | | |
1553 | 1553 | | |
1554 | 1554 | | |
| |||
1684 | 1684 | | |
1685 | 1685 | | |
1686 | 1686 | | |
1687 | | - | |
| 1687 | + | |
| 1688 | + | |
1688 | 1689 | | |
1689 | 1690 | | |
1690 | 1691 | | |
| |||
0 commit comments