Le 04/12/2023 à 23:21, Kees Cook a écrit :
[snip]
>>> diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
>>> index f87aaf28a649..270feed9fd63 100644
>>> --- a/include/uapi/linux/netlink.h
>>> +++ b/include/uapi/linux/netlink.h
>>> @@ -247,7 +247,7 @@ struct nlattr {
>>>
>>>
On Sat, Dec 02, 2023 at 01:22:12PM -0800, Kees Cook wrote:
> Replace open-coded mutex handling with cleanup.h guard(mutex) and
> scoped_guard(mutex, ...).
>
> Cc: "Guilherme G. Piccoli"
> Cc: Tony Luck
> Cc: linux-hardening@vger.kernel.org
> Signed-off-by: Kees Cook
> ---
> fs/pstore/inode.c
On Mon, Dec 04, 2023 at 08:52:13AM +0100, Thomas Weißschuh wrote:
> Tested by booting and with the sysctl selftests on x86.
Can I trouble you to rebase on sysctl-next?
https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/log/?h=sysctl-next
Luis
On Tue, Dec 5, 2023 at 1:27 PM Hyeonggon Yoo <42.hye...@gmail.com> wrote:
>
> On Mon, Nov 20, 2023 at 07:34:14PM +0100, Vlastimil Babka wrote:
> > With SLAB removed and SLUB the only remaining allocator, we can clean up
> > some code that was depending on the choice.
> >
> > Reviewed-by: Kees Cook
On Mon, Nov 20, 2023 at 07:34:27PM +0100, Vlastimil Babka wrote:
> This should result in better code. Currently kfree() makes a function
> call between compilation units to __kmem_cache_free() which does its own
> virt_to_slab(), throwing away the struct slab pointer we already had in
> kfree().
On Mon, Nov 20, 2023 at 07:34:14PM +0100, Vlastimil Babka wrote:
> With SLAB removed and SLUB the only remaining allocator, we can clean up
> some code that was depending on the choice.
>
> Reviewed-by: Kees Cook
> Reviewed-by: Marco Elver
> Signed-off-by: Vlastimil Babka
> ---
>
On Mon, Nov 20, 2023 at 07:34:13PM +0100, Vlastimil Babka wrote:
> Remove CONFIG_SLAB, CONFIG_DEBUG_SLAB, CONFIG_SLAB_DEPRECATED and
> everything in Kconfig files and mm/Makefile that depends on those. Since
> SLUB is the only remaining allocator, remove the allocator choice, make
> CONFIG_SLUB a
On Mon, Nov 20, 2023 at 07:34:12PM +0100, Vlastimil Babka wrote:
> The SLAB implementation is going to be removed, and mm-api.rst currently
> uses mm/slab.c to obtain kerneldocs for some API functions. Switch it to
> mm/slub.c and move the relevant kerneldocs of exported functions from
> one to
On Sat, Dec 02, 2023 at 10:27:06PM +, Al Viro wrote:
> On Sat, Dec 02, 2023 at 01:22:15PM -0800, Kees Cook wrote:
>
> > static void *pstore_ftrace_seq_start(struct seq_file *s, loff_t *pos)
> > {
> > @@ -338,9 +339,8 @@ int pstore_mkfile(struct dentry *root, struct
> > pstore_record
On Mon, Dec 04, 2023 at 10:22:25AM +0100, Nicolas Dichtel wrote:
> Le 02/12/2023 à 21:25, Kees Cook a écrit :
> > The return value from nla_len() is never expected to be negative, and can
> > never be more than struct nlattr::nla_len (a u16). Adjust the prototype
> > on the function. This will let
On Sun, Dec 03, 2023 at 08:48:06PM +0100, Christophe JAILLET wrote:
> The 'multipaths' field of 'struct mpconf' can be declared as a flexible
> array.
>
> The advantages are:
>- 1 less indirection when accessing to the 'multipaths' array
>- save 1 pointer in the structure
>- improve
On Mon, Dec 04, 2023 at 08:52:25AM +0100, Thomas Weißschuh wrote:
> In a future commit the sysctl core will only use
> "const struct ctl_table". As a preparation for that adapt all the proc
> handlers.
>
> Signed-off-by: Thomas Weißschuh
Reviewed-by: Kees Cook # security/*
--
Kees Cook
On Mon, Dec 04, 2023 at 08:52:21AM +0100, Thomas Weißschuh wrote:
> In a future commit the proc_handlers will change to
> "const struct ctl_table".
> As a preparation for that adapt the logic to work with a temporary
> variable, similar to how it is done in other parts of the kernel.
>
>
On Mon, Dec 04, 2023 at 08:52:18AM +0100, Thomas Weißschuh wrote:
> In a future commit the proc_handlers themselves will change to
> "const struct ctl_table". As a preparation for that adapt the internal
> helpers.
>
> Signed-off-by: Thomas Weißschuh
Acked-by: Kees Cook
--
Kees Cook
On Tue, Dec 05, 2023 at 01:46:27AM +1000, Ronald Monthero wrote:
> Cheers Kees,
> BR,
> ronald
Is this a "Tested-by"? :)
-Kees
>
>
> On Fri, Dec 1, 2023 at 6:51 AM Kees Cook wrote:
> >
> > Hi,
> >
> > This attempts to fix the issue Ronald Monthero found[1]. Avoids using a
> > too-short
Hello Kees, Martin, James,
On Thu, Nov 30, 2023 at 12:41:00PM -0800, Kees Cook wrote:
> strlcpy() reads the entire source buffer first. This read may exceed
> the destination size limit. This is both inefficient and can lead
> to linear read overflows if a source string is not NUL-terminated[1].
Cheers Kees,
BR,
ronald
On Fri, Dec 1, 2023 at 6:51 AM Kees Cook wrote:
>
> Hi,
>
> This attempts to fix the issue Ronald Monthero found[1]. Avoids using a
> too-short struct buffer when reading the string, by using the existing
> struct union.
>
> -Kees
>
> [1]
>
Le 02/12/2023 à 21:25, Kees Cook a écrit :
> The return value from nla_len() is never expected to be negative, and can
> never be more than struct nlattr::nla_len (a u16). Adjust the prototype
> on the function. This will let GCC's value range optimization passes
> know that the return can never
Hey
I see that you sent a V2. I'll try to get to it at the end of the week.
On Sun, Dec 03, 2023 at 04:37:01PM +0100, Thomas Weißschuh wrote:
> Hi Joel,
>
> On 2023-12-01 17:31:20+0100, Joel Granados wrote:
> > Hey Thomas.
> >
> > Thx for the clarifications. I did more of a deep dive into your
Kees Cook writes:
> On Thu, Nov 16, 2023 at 02:57:24PM -0600, Gustavo A. R. Silva wrote:
>
>> Transform zero-length arrays `adm_stat` and `msdu_cnt` into proper
>> flexible-array members in anonymous union in `struct
>> mt7996_mcu_all_sta_info_event` via the DECLARE_FLEX_ARRAY()
>> helper; and
20 matches
Mail list logo