#
5a2b666c |
| 01-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
f3677984 |
| 30-Sep-2015 |
Andrey V. Elsukov <ae@FreeBSD.org> |
Take extra reference to security policy before calling crypto_dispatch().
Currently we perform crypto requests for IPSEC synchronous for most of crypto providers (software, aesni) and only VIA padlo
Take extra reference to security policy before calling crypto_dispatch().
Currently we perform crypto requests for IPSEC synchronous for most of crypto providers (software, aesni) and only VIA padlock calls crypto callback asynchronous. In synchronous mode it is possible, that security policy will be removed during the processing crypto request. And crypto callback will release the last reference to SP. Then upon return into ipsec[46]_process_packet() IPSECREQUEST_UNLOCK() will be called to already freed request. To prevent this we will take extra reference to SP.
PR: 201876 Sponsored by: Yandex LLC
show more ...
|
#
f94594b3 |
| 12-Sep-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Finish merging from head, messed up in previous attempt
|
#
ab875b71 |
| 14-Aug-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with head, primarily for the 1.14.4.0 firmware.
|
Revision tags: release/10.2.0 |
|
#
1347814c |
| 07-Aug-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r285924 through r286421.
|
#
59959de5 |
| 30-Jul-2015 |
Ermal Luçi <eri@FreeBSD.org> |
Correct IPSec SA statistic keeping
The IPsec SA statistic keeping is used even for decision making on expiry/rekeying SAs. When there are multiple transformations being done the statistic keeping mi
Correct IPSec SA statistic keeping
The IPsec SA statistic keeping is used even for decision making on expiry/rekeying SAs. When there are multiple transformations being done the statistic keeping might be wrong.
This mostly impacts multiple encapsulations on IPsec since the usual scenario it is not noticed due to the code path not taken.
Differential Revision: https://reviews.freebsd.org/D3239 Reviewed by: ae, gnn Approved by: gnn(mentor)
show more ...
|
#
416ba5c7 |
| 22-Jun-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with HEAD (r280229-r284686).
|
#
98e0ffae |
| 27-May-2015 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge sync of head
|
#
7757a1b4 |
| 03-May-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
de7df74b |
| 01-May-2015 |
Glen Barber <gjb@FreeBSD.org> |
MFH: r281855-r282312
Sponsored by: The FreeBSD Foundation
|
#
6508929b |
| 28-Apr-2015 |
Andrey V. Elsukov <ae@FreeBSD.org> |
Fix the comment. We will not do SPD lookup again, because ip[6]_ipsec_output() will find PACKET_TAG_IPSEC_OUT_DONE mbuf tag.
Sponsored by: Yandex LLC
|
#
574fde00 |
| 28-Apr-2015 |
Andrey V. Elsukov <ae@FreeBSD.org> |
Since PFIL can change mbuf pointer, we should update pointers after calling ipsec_filter().
Sponsored by: Yandex LLC
|
#
3d80e82d |
| 27-Apr-2015 |
Andrey V. Elsukov <ae@FreeBSD.org> |
Fix possible use after free due to security policy deletion.
When we are passing mbuf to IPSec processing via ipsec[46]_process_packet(), we hold one reference to security policy and release it just
Fix possible use after free due to security policy deletion.
When we are passing mbuf to IPSec processing via ipsec[46]_process_packet(), we hold one reference to security policy and release it just after return from this function. But IPSec processing can be deffered and when we release reference to security policy after ipsec[46]_process_packet(), user can delete this security policy from SPDB. And when IPSec processing will be done, xform's callback function will do access to already freed memory.
To fix this move KEY_FREESP() into callback function. Now IPSec code will release reference to SP after processing will be finished.
Differential Revision: https://reviews.freebsd.org/D2324 No objections from: #network Sponsored by: Yandex LLC
show more ...
|
#
7263c8c0 |
| 22-Apr-2015 |
Glen Barber <gjb@FreeBSD.org> |
MFH: r280643-r281852
Sponsored by: The FreeBSD Foundation
|
#
7fffcb0d |
| 20-Apr-2015 |
Glen Barber <gjb@FreeBSD.org> |
MFH: r281668 through r281783
Sponsored by: The FreeBSD Foundation
|
#
962ac6c7 |
| 18-Apr-2015 |
Andrey V. Elsukov <ae@FreeBSD.org> |
Change ipsec_address() and ipsec_logsastr() functions to take two additional arguments - buffer and size of this buffer.
ipsec_address() is used to convert sockaddr structure to presentation format.
Change ipsec_address() and ipsec_logsastr() functions to take two additional arguments - buffer and size of this buffer.
ipsec_address() is used to convert sockaddr structure to presentation format. The IPv6 part of this function returns pointer to the on-stack buffer and at the moment when it will be used by caller, it becames invalid. IPv4 version uses 4 static buffers and returns pointer to new buffer each time when it called. But anyway it is still possible to get corrupted data when several threads will use this function.
ipsec_logsastr() is used to format string about SA entry. It also uses static buffer and has the same problem with concurrent threads.
To fix these problems add the buffer pointer and size of this buffer to arguments. Now each caller will pass buffer and its size to these functions. Also convert all places where these functions are used (except disabled code).
And now ipsec_address() uses inet_ntop() function from libkern.
PR: 185996 Differential Revision: https://reviews.freebsd.org/D2321 Reviewed by: gnn Sponsored by: Yandex LLC
show more ...
|
#
1ae800e7 |
| 18-Apr-2015 |
Andrey V. Elsukov <ae@FreeBSD.org> |
Fix handling of scoped IPv6 addresses in IPSec code.
* in ipsec_encap() embed scope zone ids into link-local addresses in the new IPv6 header, this helps ip6_output() disambiguate the scope; * t
Fix handling of scoped IPv6 addresses in IPSec code.
* in ipsec_encap() embed scope zone ids into link-local addresses in the new IPv6 header, this helps ip6_output() disambiguate the scope; * teach key_ismyaddr6() use in6_localip(). in6_localip() is less strict than key_sockaddrcmp(). It doesn't compare all fileds of struct sockaddr_in6, but it is faster and it should be safe, because all SA's data was checked for correctness. Also, since IPv6 link-local addresses in the &V_in6_ifaddrhead are stored in kernel-internal form, we need to embed scope zone id from SA into the address before calling in6_localip. * in ipsec_common_input() take scope zone id embedded in the address and use it to initialize sin6_scope_id, then use this sockaddr structure to lookup SA, because we keep addresses in the SADB without embedded scope zone id.
Differential Revision: https://reviews.freebsd.org/D2304 Reviewed by: gnn Sponsored by: Yandex LLC
show more ...
|
#
61f37615 |
| 18-Apr-2015 |
Andrey V. Elsukov <ae@FreeBSD.org> |
Remove xform_ipip.c and code related to XF_IP4.
The only thing is used from this code is ipip_output() function, that does IPIP encapsulation. Other parts of XF_IP4 code were removed in r275133. Als
Remove xform_ipip.c and code related to XF_IP4.
The only thing is used from this code is ipip_output() function, that does IPIP encapsulation. Other parts of XF_IP4 code were removed in r275133. Also it isn't possible to configure the use of XF_IP4, nor from userland via setkey(8), nor from the kernel.
Simplify the ipip_output() function and rename it to ipsec_encap(). * move IP_DF handling from ipsec4_process_packet() into ipsec_encap(); * since ipsec_encap() called from ipsec[64]_process_packet(), it is safe to assume that mbuf is contiguous at least to IP header for used IP version. Remove all unneeded m_pullup(), m_copydata and related checks. * use V_ip_defttl and V_ip6_defhlim for outer headers; * use V_ip4_ipsec_ecn and V_ip6_ipsec_ecn for outer headers; * move all diagnostic messages to the ipsec_encap() callers; * simplify handling of ipsec_encap() results: if it returns non zero value, print diagnostic message and free mbuf. * some style(9) fixes.
Differential Revision: https://reviews.freebsd.org/D2303 Reviewed by: glebius Sponsored by: Yandex LLC
show more ...
|
#
d899be7d |
| 19-Jan-2015 |
Glen Barber <gjb@FreeBSD.org> |
Reintegrate head: r274132-r277384
Sponsored by: The FreeBSD Foundation
|
#
8f0ea33f |
| 13-Jan-2015 |
Glen Barber <gjb@FreeBSD.org> |
Reintegrate head revisions r273096-r277147
Sponsored by: The FreeBSD Foundation
|
#
afbe8aa4 |
| 18-Dec-2014 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead @ r275911 (also, sort out MK_* flags in BMAKE, etc on this branch)
|
#
f45aab62 |
| 11-Dec-2014 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r275685 through r275714.
|
#
619764be |
| 11-Dec-2014 |
Andrey V. Elsukov <ae@FreeBSD.org> |
Remove flags and tunalready arguments from ipsec4_process_packet() and make its prototype similar to ipsec6_process_packet. The flags argument isn't used here, tunalready is always zero.
Obtained fr
Remove flags and tunalready arguments from ipsec4_process_packet() and make its prototype similar to ipsec6_process_packet. The flags argument isn't used here, tunalready is always zero.
Obtained from: Yandex LLC Sponsored by: Yandex LLC
show more ...
|
#
da976f9d |
| 05-Dec-2014 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead @ r275496
|
#
24ce0a02 |
| 04-Dec-2014 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r275387 through r275477.
|