FreeBSD Bugzilla – Attachment 243503 Details for
Bug 272616
[panic] Reproducible kernel panic related to sendfile and IPSec
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ipsec: ensure that mbufs are mapped if ipsec is enabled
1.patch (text/plain), 1.30 KB, created by
Konstantin Belousov
on 2023-07-20 12:10:22 UTC
(
hide
)
Description:
ipsec: ensure that mbufs are mapped if ipsec is enabled
Filename:
MIME Type:
Creator:
Konstantin Belousov
Created:
2023-07-20 12:10:22 UTC
Size:
1.30 KB
patch
obsolete
>commit 91002d9bcd1cf4ca1683458a8761cfa0521282d2 >Author: Konstantin Belousov <kib@FreeBSD.org> >Date: Thu Jul 20 15:08:24 2023 +0300 > > ipsec: ensure that mbufs are mapped if ipsec is enabled > > PR: 272616 > >diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c >index a278719cad3b..89929f732392 100644 >--- a/sys/netinet/ip_output.c >+++ b/sys/netinet/ip_output.c >@@ -671,6 +671,12 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags, > sendit: > #if defined(IPSEC) || defined(IPSEC_SUPPORT) > if (IPSEC_ENABLED(ipv4)) { >+ m = mb_unmapped_to_ext(m); >+ if (m == NULL) { >+ IPSTAT_INC(ips_odropped); >+ error = ENOBUFS; >+ goto bad; >+ } > if ((error = IPSEC_OUTPUT(ipv4, ifp, m, inp, mtu)) != 0) { > if (error == EINPROGRESS) > error = 0; >diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c >index b1613c62b549..32834e45b6a4 100644 >--- a/sys/netinet6/ip6_output.c >+++ b/sys/netinet6/ip6_output.c >@@ -791,6 +791,12 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, > * XXX: need scope argument. > */ > if (IPSEC_ENABLED(ipv6)) { >+ m = mb_unmapped_to_ext(m); >+ if (m == NULL) { >+ IP6STAT_INC(ip6s_odropped); >+ error = ENOBUFS; >+ goto bad; >+ } > if ((error = IPSEC_OUTPUT(ipv6, ifp, m, inp, mtu)) != 0) { > if (error == EINPROGRESS) > error = 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 272616
: 243503