Discussion:
[Bug 254478] Panic when using ipfw and divert sockets
b***@freebsd.org
2021-03-30 09:43:05 UTC
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254478

--- Comment #5 from commit-***@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=c80a4b76ceacc5aab322e7ac1407eea8c90cb3b1

commit c80a4b76ceacc5aab322e7ac1407eea8c90cb3b1
Author: Andrey V. Elsukov <***@FreeBSD.org>
AuthorDate: 2021-03-30 09:31:09 +0000
Commit: Andrey V. Elsukov <***@FreeBSD.org>
CommitDate: 2021-03-30 09:31:09 +0000

ipdivert: check that PCB is still valid after taking INPCB_RLOCK.

We are inspecting PCBs of divert sockets under NET_EPOCH section,
but PCB could be already detached and we should check INP_FREED flag
when we took INP_RLOCK.

PR: 254478
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29420

sys/netinet/ip_divert.c | 4 ++++
1 file changed, 4 insertions(+)
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
b***@freebsd.org
2021-04-06 06:50:52 UTC
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254478

--- Comment #6 from commit-***@FreeBSD.org ---
A commit in branch stable/13 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=6b8c65318e81a451b33ed57b84a5495284dcb20f

commit 6b8c65318e81a451b33ed57b84a5495284dcb20f
Author: Andrey V. Elsukov <***@FreeBSD.org>
AuthorDate: 2021-03-30 09:31:09 +0000
Commit: Andrey V. Elsukov <***@FreeBSD.org>
CommitDate: 2021-04-06 06:47:54 +0000

ipdivert: check that PCB is still valid after taking INPCB_RLOCK.

We are inspecting PCBs of divert sockets under NET_EPOCH section,
but PCB could be already detached and we should check INP_FREED flag
when we took INP_RLOCK.

PR: 254478
Differential Revision: https://reviews.freebsd.org/D29420

(cherry picked from commit c80a4b76ceacc5aab322e7ac1407eea8c90cb3b1)

sys/netinet/ip_divert.c | 4 ++++
1 file changed, 4 insertions(+)
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
b***@freebsd.org
2021-04-06 06:51:53 UTC
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254478

--- Comment #7 from commit-***@FreeBSD.org ---
A commit in branch stable/12 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=38c299fe856216d6ab38eb5e04d9ee4f8c22995d

commit 38c299fe856216d6ab38eb5e04d9ee4f8c22995d
Author: Andrey V. Elsukov <***@FreeBSD.org>
AuthorDate: 2021-03-30 09:31:09 +0000
Commit: Andrey V. Elsukov <***@FreeBSD.org>
CommitDate: 2021-04-06 06:50:55 +0000

ipdivert: check that PCB is still valid after taking INPCB_RLOCK.

We are inspecting PCBs of divert sockets under NET_EPOCH section,
but PCB could be already detached and we should check INP_FREED flag
when we took INP_RLOCK.

PR: 254478
Differential Revision: https://reviews.freebsd.org/D29420

(cherry picked from commit c80a4b76ceacc5aab322e7ac1407eea8c90cb3b1)

sys/netinet/ip_divert.c | 4 ++++
1 file changed, 4 insertions(+)
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
Loading...