#
7f4731ab |
| 11-Sep-2024 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
libnv: correct the calculation of the structure's size
Reported by: Milosz Kaniewski <milosz.kaniewski@gmail.com>
|
#
241a7ddd |
| 29-Aug-2024 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
libnv: add tests to verify potential overflow issues
Differential Revision: https://reviews.freebsd.org/D46131
|
#
36fa90db |
| 26-Aug-2024 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
libnv: allocate buffer in a safe way
Ensure that the calculation of size of array doesn't overflow.
Security: FreeBSD-24:09.libnv Security: CVE-2024-45287 Security: CAP-02 Reported by: Synacktiv Re
libnv: allocate buffer in a safe way
Ensure that the calculation of size of array doesn't overflow.
Security: FreeBSD-24:09.libnv Security: CVE-2024-45287 Security: CAP-02 Reported by: Synacktiv Reported by: Taylor R Campbell (NetBSD) Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46131
show more ...
|
Revision tags: release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
5916ae1f |
| 06-Dec-2021 |
Robert Wing <rew@FreeBSD.org> |
libnv: read entire datagram in nvlist_recv()
When SOCK_DGRAM is used, a portion of the datagram is discarded during the initial recv() when getting the nvlist_header.
To workaround this, use MSG_PE
libnv: read entire datagram in nvlist_recv()
When SOCK_DGRAM is used, a portion of the datagram is discarded during the initial recv() when getting the nvlist_header.
To workaround this, use MSG_PEEK for the initial recv() when using a datagram socket.
Add tests for SOCK_DGRAM with nvlist_send()/nvlist_recv().
Differential Revision: https://reviews.freebsd.org/D32722
show more ...
|
#
db158b99 |
| 06-Dec-2021 |
Robert Wing <rew@FreeBSD.org> |
libnv: let nvlist_recv() pass flags to recv()
Differential Revision: https://reviews.freebsd.org/D32721
|
Revision tags: release/12.3.0 |
|
#
89d5cbb8 |
| 11-Jun-2021 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
libnv: optimize nvlist size calculation
If we had a multiple nvlist, during nvlist_pack, we calculated the size of every nvlist separately. For example, if we had a nvlist with three nodes each cont
libnv: optimize nvlist size calculation
If we had a multiple nvlist, during nvlist_pack, we calculated the size of every nvlist separately. For example, if we had a nvlist with three nodes each containing another (A contains B, and B contains C), we first calculated the size of nvlist A (which contains B, C), then we calculate the size of B (which contains C, notice that we already did the calculation of B, when we calculate A), and finally C. This means that this calculation was O(N!). This was done because each time we pack nvlist, we have to put its size in the header (the separate header for A, B, and C).
To not break the ABI and to reduce the complexity of nvlist_size, instead of calculating the nvlist size when requested, we track the size of each nvlist.
Reported by: pjd, kp Tested by: kp
show more ...
|
Revision tags: release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0 |
|
#
7648bc9f |
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @347527
Sponsored by: The FreeBSD Foundation
|
#
431c5bb8 |
| 11-Apr-2019 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
The nvlist_report_missing is also used by the cnvlist. It can't be a static one.
Reported by: jenkins MFC after: 2 weeks
|
#
dab22642 |
| 11-Apr-2019 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
libnv: fix compilation warnings
When building libnv without a debug those arguments are no longer used because assertions will be changed to NOP.
Submitted by: Mindaugas Rasiukevicius <rmind@netbsd
libnv: fix compilation warnings
When building libnv without a debug those arguments are no longer used because assertions will be changed to NOP.
Submitted by: Mindaugas Rasiukevicius <rmind@netbsd.org> MFC after: 2 weeks
show more ...
|
#
c981cbbd |
| 15-Feb-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r343956 through r344177.
|
#
b5d787d9 |
| 11-Feb-2019 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
libnv: fix memory leaks
nvpair_create_stringv: free the temporary string; this fix affects nvlist_add_stringf() and nvlist_add_stringv().
nvpair_remove_nvlist_array (NV_TYPE_NVLIST_ARRAY case): fre
libnv: fix memory leaks
nvpair_create_stringv: free the temporary string; this fix affects nvlist_add_stringf() and nvlist_add_stringv().
nvpair_remove_nvlist_array (NV_TYPE_NVLIST_ARRAY case): free the chain of nvpairs (as resetting it prevents nvlist_destroy() from freeing it). Note: freeing the chain in nvlist_destroy() is not sufficient, because it would still leak through nvlist_take_nvlist_array(). This affects all nvlist_*_nvlist_array() use
Submitted by: Mindaugas Rasiukevicius <rmind@netbsd.org> Reported by: clang/gcc ASAN MFC after: 2 weeks
show more ...
|
Revision tags: release/12.0.0, release/11.2.0 |
|
#
24881c06 |
| 19-Jun-2018 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
libnv: Add nvlist_append_*_array() family of functions.
The nvlist_append_{bool,number,string,nvlist,descriptor}_array() functions allows to dynamically extend array stored in the nvlist.
Submitted
libnv: Add nvlist_append_*_array() family of functions.
The nvlist_append_{bool,number,string,nvlist,descriptor}_array() functions allows to dynamically extend array stored in the nvlist.
Submitted by: Mindaugas Rasiukevicius <rmind@netbsd.org>
show more ...
|
#
1acf3485 |
| 27-Jan-2018 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
Add SPDX tags for nv(9).
MFC after: 2 weeks
|
#
c2c014f2 |
| 07-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r323559 through r325504.
|
#
3c5ab8c1 |
| 30-Oct-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r325119
|
#
9a8ce256 |
| 26-Oct-2017 |
Jilles Tjoelker <jilles@FreeBSD.org> |
libnv: Fix strict-aliasing violation with cookie
In rS323851, some casts were adjusted in calls to nvlist_next() and nvlist_get_pararr() in order to make scan-build happy. I think these changes just
libnv: Fix strict-aliasing violation with cookie
In rS323851, some casts were adjusted in calls to nvlist_next() and nvlist_get_pararr() in order to make scan-build happy. I think these changes just confused scan-build into not reporting the strict-aliasing violation.
For example, nvlist_xdescriptors() is causing nvlist_next() to write to its local variable nvp of type nvpair_t * using the lvalue *cookiep of type void *, which is not allowed. Given the APIs of nvlist_next(), nvlist_get_parent() and nvlist_get_pararr(), one possible fix is to create a local void *cookie in nvlist_xdescriptors() and other places, and to convert the value to nvpair_t * when necessary. This patch implements that fix.
Reviewed by: oshogbo MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D12760
show more ...
|
Revision tags: release/10.4.0 |
|
#
e5d34ca9 |
| 23-Sep-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r320180
|
#
a3c485d3 |
| 21-Sep-2017 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
Make the code consistent by always using 'fail' label.
Submitted by: pjd@ and oshogbo@ MFC after: 1 month Sponsored by: Wheel Systems
|
#
1dacabe1 |
| 21-Sep-2017 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
The 'while (array != NULL) { }' suggests scan-build that array may be initially NULL, which is not possible. Change the loop to 'do {} while (array != NULL)' to satisfy scan-build and assert that arr
The 'while (array != NULL) { }' suggests scan-build that array may be initially NULL, which is not possible. Change the loop to 'do {} while (array != NULL)' to satisfy scan-build and assert that array really cannot be NULL just in case.
Submitted by: pjd@ Found by: scan-build MFC after: 1 month Sponsored by: Wheel Systems
show more ...
|
#
08016b31 |
| 21-Sep-2017 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
Remove redundant initialization. Don't use variable - just return the value. Make scan-build happy by casting to 'void *' instead of 'void **'.
Submitted by: pjd@ MFC after: 1 month Found by: scan-b
Remove redundant initialization. Don't use variable - just return the value. Make scan-build happy by casting to 'void *' instead of 'void **'.
Submitted by: pjd@ MFC after: 1 month Found by: scan-build and cppcheck Sponsored by: Wheel Systems
show more ...
|
Revision tags: release/11.1.0, release/11.0.1, release/11.0.0 |
|
#
2f52412d |
| 29-Aug-2016 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead @ r305013
|
#
29ed43fc |
| 28-Aug-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r304885 through r304954.
|
#
5ef231f6 |
| 27-Aug-2016 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
Add cnv API.
cnv API is a set of functions for managing name/value pairs by cookie. The cookie can be obtained by nvlist_next(), nvlist_get_parent() or nvlist_get_pararr() function. This patch also
Add cnv API.
cnv API is a set of functions for managing name/value pairs by cookie. The cookie can be obtained by nvlist_next(), nvlist_get_parent() or nvlist_get_pararr() function. This patch also includes unit tests.
Submitted by: Adam Starak <starak.adam@gmail.com>
show more ...
|
#
27067774 |
| 16-Aug-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r303250 through r304235.
|