Re: [PATCH][next] ext4: avoid dozens of -Wflex-array-member-not-at-end warnings

2025-02-06 Thread Theodore Ts'o
On Fri, Feb 07, 2025 at 09:39:42AM +1030, Gustavo A. R. Silva wrote: > > > Thanks, for this patch! It appears that this patch has since been > > obviated by Eric Bigger's commit f2b4fa19647e (" ext4: switch to using > > the crc32c library"), which landed during this merge window, so this > > patc

Re: [PATCH][next] ext4: avoid dozens of -Wflex-array-member-not-at-end warnings

2025-02-06 Thread Theodore Ts'o
On Tue, Nov 19, 2024 at 04:37:05PM -0600, Gustavo A. R. Silva wrote: > -Wflex-array-member-not-at-end was introduced in GCC-14, and we > are getting ready to enable it, globally. > > Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of > a flexible structure (`struct shash_desc`) where

Re: [syzbot] [hardening?] [mm?] BUG: bad usercopy in vfs_readlink

2025-02-04 Thread Theodore Ts'o
On Tue, Feb 04, 2025 at 10:25:29PM +0100, Mateusz Guzik wrote: > > > > My question is if that's legitimate, I'm guessing not. If not, then > > ext4 should complain about it. > > > > On stock kernel this happens to work because strlen finds the "right" size. > > > > So it occurred to me to check wh

Re: [syzbot] [hardening?] [mm?] BUG: bad usercopy in vfs_readlink

2025-02-04 Thread Theodore Ts'o
On Tue, Feb 04, 2025 at 05:49:48PM +0100, Mateusz Guzik wrote: > I'm going to restate: the original behavior can be restored by > replacing i_size usage with a strlen call. However, as is I have no > basis to think that the disparity between the two is legitimate. If an > ext4 person (Ted cc'ed) te

Re: [PATCH v2] ext4: Annotate struct fname with __counted_by()

2024-11-14 Thread Theodore Ts'o
are concerned that I might have missed a patch, feel free to reply to the original patch with a ping. I'll see it in my inbox, and even if it had gotten lost in my inbox, I can find the original patch using lore.kernel.org or patchwork. Thanks! Best regards, -- Theodore Ts'o

Re: [PATCH v2][next] jbd2: Avoid dozens of -Wflex-array-member-not-at-end warnings

2024-11-14 Thread Theodore Ts'o
1afe090319263 Best regards, -- Theodore Ts'o

Re: [PATCH v4] ext4: Annotate struct ext4_xattr_inode_array with __counted_by()

2024-08-27 Thread Theodore Ts'o
with __counted_by() commit: 01cdf03b1378f2d860d4eb5951895a92002226a3 Best regards, -- Theodore Ts'o

Re: Linux 6.10 regression resulting in a crash when using an ext4 filesystem

2024-07-22 Thread Theodore Ts'o
On Mon, Jul 22, 2024 at 12:06:59AM -0700, Kees Cook wrote: > >Is strscpy_pad appropriate if the @src parameter itself is a fixed > >length char[16] which isn't null terminated when the label itself is 16 > >chars long? > > Nope; it needed memtostr_pad(). I sent the fix back at the end of May, but

Re: [PATCH] ext4: Use memtostr_pad() for s_volume_name

2024-07-10 Thread Theodore Ts'o
> the right replacement for strncpy(); it should use memtostr_pad() > instead. > > > [...] Applied, thanks! [1/1] ext4: Use memtostr_pad() for s_volume_name commit: be27cd64461c45a6088a91a04eba5cd44e1767ef Best regards, -- Theodore Ts'o

Re: [RFC] Mitigating unexpected arithmetic overflow

2024-05-17 Thread Theodore Ts'o
On Fri, May 17, 2024 at 02:15:01PM -0700, Kees Cook wrote: > On Thu, May 16, 2024 at 02:51:34PM -0600, Theodore Ts'o wrote: > > On Thu, May 16, 2024 at 12:48:47PM -0700, Justin Stitt wrote: > > > > > > It is incredibly important that the exact opposite approa

Re: [RFC] Mitigating unexpected arithmetic overflow

2024-05-16 Thread Theodore Ts'o
On Thu, May 16, 2024 at 12:48:47PM -0700, Justin Stitt wrote: > > It is incredibly important that the exact opposite approach is taken; > we need to be annotating (or adding type qualifiers to) the _expected_ > overflow cases. The omniscience required to go and properly annotate > all the spots th

Re: [RFC] Mitigating unexpected arithmetic overflow

2024-05-09 Thread Theodore Ts'o
On Wed, May 08, 2024 at 11:11:35PM -0700, Kees Cook wrote: > > I think it would be interesting in general to have some kind of > > warning for "implicit cast drops bits". > > > > I fear that we'd have an enormous about of them, and maybe they'd be > > unsolvable without making the code *much* ugli

Re: [PATCH] ext4: replace deprecated strncpy with alternatives

2024-05-02 Thread Theodore Ts'o
strncpy with alternatives commit: 744a56389f7398f286231e062c2e63f0de01bcc6 Best regards, -- Theodore Ts'o

Re: [PATCH] cap_syslog: remove CAP_SYS_ADMIN when dmesg_restrict

2024-01-05 Thread Theodore Ts'o
On Fri, Jan 05, 2024 at 02:20:07PM +0800, Jingzi Meng wrote: > CAP_SYSLOG was separated from CAP_SYS_ADMIN and introduced in Linux > 2.6.37 (2010-11). For a long time, certain syslog actions required > CAP_SYS_ADMIN or CAP_SYSLOG. Maybe it’s time to officially remove > CAP_SYS_ADMIN for more fine-g