On 18/03/24 17:40, Kees Cook wrote:
On Sun, Mar 17, 2024 at 05:44:42PM +0100, Erick Archer wrote:
This is an effort to get rid of all multiplications from allocation
functions in order to prevent integer overflows [1][2].
As the "rapl_pmus" variable is a pointer to "struct rapl_pmus" and
thi
On Mon, Mar 18, 2024 at 10:49:23PM +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
I don't mind changing the strncpy() in this function, but I don't think
th
On 3/18/24 17:53, Kees Cook wrote:
On Mon, Mar 18, 2024 at 05:00:33PM -0600, Gustavo A. R. Silva wrote:
We need a new `struct_group()` helper that allows for both having the
struct be tagged, and specifying struct attributes like `__packed`
or `__align(x)`.
This new helper will initially be
On Mon, Mar 18, 2024 at 05:00:33PM -0600, Gustavo A. R. Silva wrote:
> We need a new `struct_group()` helper that allows for both having the
> struct be tagged, and specifying struct attributes like `__packed`
> or `__align(x)`.
>
> This new helper will initially be used to address
> -Wflex-array-
On Mon, Mar 18, 2024 at 10:49:23PM +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> @query is already marked as __nonstring and doesn't need to be
> NUL-term
On Mon, Mar 18, 2024 at 03:47:38PM -0700, Justin Stitt wrote:
> Gotcha, I was operating under the assumption that we needed to know
> the size of id at compile time. Apparently __builtin_object_size(_, 1)
> will return SIZE_T_MAX if we don't know the size of something. Sending
> a v2.
Yeah, it onl
On Mon, Mar 18, 2024 at 10:56:12PM +0100, Borislav Petkov wrote:
> On Mon, Mar 18, 2024 at 02:40:50PM -0700, Kees Cook wrote:
> > Applied to for-next/hardening
>
> Why?
>
> This is a patch that should go through the tip tree, if at all.
The commit it refs to landed via -hardening, so I was takin
On Sun, Mar 17, 2024 at 05:44:42PM +0100, Erick Archer wrote:
> This is an effort to get rid of all multiplications from allocation
> functions in order to prevent integer overflows [1][2].
>
> As the "rapl_pmus" variable is a pointer to "struct rapl_pmus" and
> this structure ends in a flexible a
strscpy(ep->name, name);
ep->ep.name = ep->name;
ep->ep.caps.type_iso = true;
---
base-commit: bf3a69c6861ff4dc7892d895c87074af7bc1c400
change-id: 20240318-strncpy-drivers-usb-gadget-udc-mv_u3d_core-c-50ea7422311c
Best regards,
--
Justin Stitt
%'))
return -EINVAL;
- strncpy(net->name, tmp, sizeof(net->name));
+ strscpy(net->name, tmp);
dev->ifname_set = true;
return 0;
---
base-commit: bf3a69c6861ff4dc7892d895c87074af7bc1c400
change-id: 20240318-strncpy-drivers-usb-gadget-function-u_ether-c-125ed8336ca5
Best regards,
--
Justin Stitt
me */
/* reconfigure dlci for network */
dlci->prev_adaption = dlci->adaption;
---
base-commit: bf3a69c6861ff4dc7892d895c87074af7bc1c400
change-id: 20240318-strncpy-drivers-tty-n_gsm-c-ab1336e0e196
Best regards,
--
Justin Stitt
We need a new `struct_group()` helper that allows for both having the
struct be tagged, and specifying struct attributes like `__packed`
or `__align(x)`.
This new helper will initially be used to address
-Wflex-array-member-not-at-end warnings, where a tagged struct is used
to separate the flexibl
strncpy() is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces.
@query is already marked as __nonstring and doesn't need to be
NUL-terminated. Since @id is a string, we can use the self-describing
string API s
On Mon, Mar 18, 2024 at 2:52 PM Kees Cook wrote:
>
> On Thu, Mar 14, 2024 at 10:29:37PM +, Justin Stitt wrote:
> > strncpy() is deprecated for use on NUL-terminated destination strings
> > [1] and as such we should prefer more robust and less ambiguous string
> > interfaces.
> >
> > @query is
.string,
psvts[i].limit.string,
+ strscpy(psvt_user[i].limit.string,
psvts[i].limit.string,
ACPI_LIMIT_STR_MAX_LEN);
else
psvt_user[i].limit.integer = psvts[i].limit.integer;
---
base-commit: bf3a69c6861ff
strscpy(p_buf, buf, p_buf_len);
else
pr_debug("%s", buf);
---
base-commit: bf3a69c6861ff4dc7892d895c87074af7bc1c400
change-id: 20240318-strncpy-drivers-target-target_core_transport-c-1950554ec04e
Best regards,
--
Justin Stitt
On Mon, Mar 18, 2024 at 02:40:50PM -0700, Kees Cook wrote:
> Applied to for-next/hardening
Why?
This is a patch that should go through the tip tree, if at all.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
On Fri, Mar 15, 2024 at 09:53:47AM +0800, Jiapeng Chong wrote:
> The function are defined in the test_ubsan.c file, but not called
> elsewhere, so delete the unused function.
>
> lib/test_ubsan.c:137:28: warning: unused variable 'skip_ubsan_array'.
>
> Reported-by: Abaci Robot
> Closes: https://
On Thu, Mar 14, 2024 at 10:29:37PM +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> @query is already marked as __nonstring and doesn't need to be
> NUL-term
On Mon, Mar 18, 2024 at 09:32:01PM +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> We expect db_root and db_root_stage to be NUL-terminated based on its
> i
On Sun, 17 Mar 2024 23:05:47 +0800, Guixiong Wei wrote:
> The commit aaa8736370db ("x86, relocs: Ignore relocations in
> .notes section") only ignore .note section on print_absolute_relocs,
> but it also need to add on walk_relocs to avoid relocations in .note
> section.
>
>
Applied to for-next/
strncpy() is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces.
We expect db_root and db_root_stage to be NUL-terminated based on its
immediate use with pr_debug which expects a C-string argument (%s).
Moreove
On Mon, Mar 18, 2024 at 02:03:51PM +0100, Alexander Lobakin wrote:
> include/linux/compiler_types.h | 11 ++
> drivers/net/ethernet/intel/idpf/virtchnl2.h | 24 ++---
> 2 files changed, 23 insertions(+), 12 deletions(-)
Oh, I see the Subject says "kspp-next" -
On Mon, Mar 18, 2024 at 02:03:51PM +0100, Alexander Lobakin wrote:
> Some structures contain flexible arrays at the end and the counter for
> them, but the counter has explicit Endianness and thus __counted_by()
> can't be used directly.
>
> To increase test coverage for potential problems without
Both virtchnl2.h and its consumer idpf_virtchnl.c are very error-prone.
There are 10 structures with flexible arrays at the end, but 9 of them
has flex member counter in Little Endian.
Make the code a bit more robust by applying __counted_by_le() to those
9. LE platforms is the main target for this
To ease maintaining of virtchnl2.h, which already is messy enough,
make it self-contained by adding missing if_ether.h include due to
%ETH_ALEN usage.
At the same time, virtchnl2_lan_desc.h is not anywhere in the file,
so remove this include to speed up preprocessing.
Signed-off-by: Alexander Loba
Some structures contain flexible arrays at the end and the counter for
them, but the counter has explicit Endianness and thus __counted_by()
can't be used directly.
To increase test coverage for potential problems without breaking
anything, introduce __counted_by_{le,be} defined depending on platfo
Some structures contain flexible arrays at the end and the counter for
them, but the counter has explicit Endianness and thus __counted_by()
can't be used directly.
To increase test coverage for potential problems without breaking
anything, introduce __counted_by_{le,be} defined depending on platf
On Mon, Mar 11, 2024 at 10:03:35PM +0100, Pavel Machek wrote:
Hi!
From: Kees Cook
[ Upstream commit 40b9385dd8e6a0515e1c9cd06a277483556b7286 ]
FORTIFY_SOURCE has been ignoring 0-sized destinations while the kernel
code base has been converted to flexible arrays. In order to enforce
the 0-siz
Hi Mickaël, Günther,
Sorry for the delay!
On Thu, Mar 07, 2024 at 11:21:57AM +0100, Mickaël Salaün wrote:
> CCing Alejandro
>
> On Tue, Feb 27, 2024 at 05:32:20PM +0100, Günther Noack wrote:
> > On Tue, Feb 27, 2024 at 12:05:49PM +0100, Mickaël Salaün wrote:
> > > Extend the kernel support secti
30 matches
Mail list logo