Commit ad00e62
io_uring/net: check socket is valid in io_bind()/io_listen()
We need to check that sock_from_file(req->file) != NULL.
Reported-by: syzbot <[email protected]>
Closes: https://syzkaller.appspot.com/bug?extid=1e811482aa2c70afa9a0
Fixes: 7481fd9 ("io_uring: Introduce IORING_OP_BIND")
Fixes: ff140cc ("io_uring: Introduce IORING_OP_LISTEN")
Signed-off-by: Tetsuo Handa <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[axboe: move assignment of sock to where the NULL check is]
Signed-off-by: Jens Axboe <[email protected]>1 parent 943ad0b commit ad00e62
1 file changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1747 | 1747 | | |
1748 | 1748 | | |
1749 | 1749 | | |
| 1750 | + | |
1750 | 1751 | | |
1751 | 1752 | | |
1752 | | - | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
1753 | 1758 | | |
1754 | 1759 | | |
1755 | 1760 | | |
| |||
1770 | 1775 | | |
1771 | 1776 | | |
1772 | 1777 | | |
| 1778 | + | |
1773 | 1779 | | |
1774 | 1780 | | |
1775 | | - | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
1776 | 1786 | | |
1777 | 1787 | | |
1778 | 1788 | | |
| |||
0 commit comments