Re: [PATCH] exec: fix up /proc/pid/comm in the execveat(AT_EMPTY_PATH) case

2024-12-04 Thread Zbigniew Jędrzejewski-Szmek
On Sat, Nov 30, 2024 at 04:55:09PM +1100, Aleksa Sarai wrote: > On 2024-11-29, Kees Cook wrote: > > Zbigniew mentioned at Linux Plumber's that systemd is interested in > > switching to execveat() for service execution, but can't, because the > > contents of /proc/pid/comm are the file descriptor w

Re: [PATCH v4 1/1] exec: seal system mappings

2024-12-04 Thread Jeff Xu
On Wed, Dec 4, 2024 at 6:04 AM Benjamin Berg wrote: > > Hi, > > On Mon, 2024-11-25 at 20:20 +, jef...@chromium.org wrote: > > From: Jeff Xu > > > > Seal vdso, vvar, sigpage, uprobes and vsyscall. > > > > Those mappings are readonly or executable only, sealing can protect > > them from ever ch

Re: [PATCH v4 1/1] exec: seal system mappings

2024-12-04 Thread Benjamin Berg
Hi, On Wed, 2024-12-04 at 09:43 -0800, Jeff Xu wrote: > On Wed, Dec 4, 2024 at 6:04 AM Benjamin Berg > wrote: > > On Mon, 2024-11-25 at 20:20 +, jef...@chromium.org wrote: > > > From: Jeff Xu > > > > > > Seal vdso, vvar, sigpage, uprobes and vsyscall. > > > > > > Those mappings are readon

Re: [PATCH v2 1/1] binfmt_elf: mseal address zero

2024-12-04 Thread Jeff Xu
On Wed, Dec 4, 2024 at 10:04 AM Petr Tesařík wrote: > > On Tue, 6 Aug 2024 21:49:27 + > jef...@chromium.org wrote: > > > From: Jeff Xu > > > > Some legacy SVr4 apps might depend on page on address zero > > to be readable, however I can't find a reason that the page > > ever becomes writeable

Re: [PATCH v2 1/1] binfmt_elf: mseal address zero

2024-12-04 Thread Petr Tesařík
On Tue, 6 Aug 2024 21:49:27 + jef...@chromium.org wrote: > From: Jeff Xu > > Some legacy SVr4 apps might depend on page on address zero > to be readable, however I can't find a reason that the page > ever becomes writeable, so seal it. > > If there is a compain, we can make this configurab

Re: [PATCH v2] scsi: Replace zero-length array with flexible array member

2024-12-04 Thread Martin K. Petersen
Thorsten, > Replace the deprecated zero-length array with a modern flexible array > member in the struct iscsi_bsg_host_vendor_reply. Applied to 6.14/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v4 1/1] exec: seal system mappings

2024-12-04 Thread Benjamin Berg
Hi, On Mon, 2024-11-25 at 20:20 +, jef...@chromium.org wrote: > From: Jeff Xu > > Seal vdso, vvar, sigpage, uprobes and vsyscall. > > Those mappings are readonly or executable only, sealing can protect > them from ever changing or unmapped during the life time of the process. > For complete

Re: [PATCH -next] mm: usercopy: add a debugfs interface to bypass the vmalloc check.

2024-12-04 Thread Uladzislau Rezki
> On Tue, Dec 03, 2024 at 08:02:26PM +0100, Uladzislau Rezki wrote: > > I think there are a few other things we can try here. > > First, if the copy is small (and I still don't have an answer to that > ...), we can skip the vmalloc lookup if the copy doesn't cross a page > boundary. > I noticed t

Re: [PATCH -next] mm: usercopy: add a debugfs interface to bypass the vmalloc check.

2024-12-04 Thread Uladzislau Rezki
On Wed, Dec 04, 2024 at 05:21:12PM +0800, zuoze wrote: > > > 在 2024/12/4 15:55, Uladzislau Rezki 写道: > > On Tue, Dec 03, 2024 at 07:56:34PM +, Matthew Wilcox wrote: > > > On Tue, Dec 03, 2024 at 08:02:26PM +0100, Uladzislau Rezki wrote: > > > > > > I think there are a few other things we can

Re: [PATCH -next] mm: usercopy: add a debugfs interface to bypass the vmalloc check.

2024-12-04 Thread zuoze
在 2024/12/4 15:55, Uladzislau Rezki 写道: On Tue, Dec 03, 2024 at 07:56:34PM +, Matthew Wilcox wrote: On Tue, Dec 03, 2024 at 08:02:26PM +0100, Uladzislau Rezki wrote: I think there are a few other things we can try here. First, if the copy is small (and I still don't have an answer to th

Re: [PATCH] fortify: Use __struct_size replace __member_size

2024-12-04 Thread Kees Cook
On December 4, 2024 4:41:49 PM GMT+10:00, 1507...@163.com wrote: >From: lihaojie > >Use __struct_size get destination size. > >Size of destination less of the size to be written will >make buffer overflow, the size of destination should be >complete. > I cannot understand what you mean her

Re: [PATCH -next] mm: usercopy: add a debugfs interface to bypass the vmalloc check.

2024-12-04 Thread Uladzislau Rezki
On Tue, Dec 03, 2024 at 07:56:34PM +, Matthew Wilcox wrote: > On Tue, Dec 03, 2024 at 08:02:26PM +0100, Uladzislau Rezki wrote: > > I think there are a few other things we can try here. > > First, if the copy is small (and I still don't have an answer to that > ...), we can skip the vmalloc l