Re: [PATCH 3/4] xattr: Use dedicated slab buckets for setxattr()

2024-03-04 Thread Kees Cook
On Mon, Mar 04, 2024 at 02:16:48PM -0800, Eric Biggers wrote: > On Mon, Mar 04, 2024 at 10:49:31AM -0800, Kees Cook wrote: > > xattr: Use dedicated slab buckets for setxattr() > > This patch actually changes listxattr(), not setxattr(). > > getxattr(), setxattr(), and listxattr() all allocate a u

Re: [PATCH 3/4] xattr: Use dedicated slab buckets for setxattr()

2024-03-04 Thread Eric Biggers
On Mon, Mar 04, 2024 at 10:49:31AM -0800, Kees Cook wrote: > xattr: Use dedicated slab buckets for setxattr() This patch actually changes listxattr(), not setxattr(). getxattr(), setxattr(), and listxattr() all allocate a user controlled size. Perhaps you meant to change all three? What is speci

Re: [PATCH 3/4] xattr: Use dedicated slab buckets for setxattr()

2024-03-04 Thread Kees Cook
On Tue, Mar 05, 2024 at 08:16:30AM +1100, Dave Chinner wrote: > On Mon, Mar 04, 2024 at 10:49:31AM -0800, Kees Cook wrote: > > The setxattr() API can be used for exploiting[1][2][3] use-after-free > > type confusion flaws in the kernel. Avoid having a user-controlled size > > cache share the global

Re: [PATCH 3/4] xattr: Use dedicated slab buckets for setxattr()

2024-03-04 Thread Dave Chinner
On Mon, Mar 04, 2024 at 10:49:31AM -0800, Kees Cook wrote: > The setxattr() API can be used for exploiting[1][2][3] use-after-free > type confusion flaws in the kernel. Avoid having a user-controlled size > cache share the global kmalloc allocator by using a separate set of > kmalloc buckets. > >

[PATCH 3/4] xattr: Use dedicated slab buckets for setxattr()

2024-03-04 Thread Kees Cook
The setxattr() API can be used for exploiting[1][2][3] use-after-free type confusion flaws in the kernel. Avoid having a user-controlled size cache share the global kmalloc allocator by using a separate set of kmalloc buckets. Link: https://duasynt.com/blog/linux-kernel-heap-spray [1] Link: https: