Re: [PATCH] hfsplus: Use struct_group_attr() for memcpy() region

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 19, 2021 at 11:28:51AM -0800, Kees Cook wrote:
> In preparation for FORTIFY_SOURCE performing compile-time and run-time
> field bounds checking for memset(), avoid intentionally writing across
> neighboring fields.
> 
> Add struct_group() to mark the "info" region (containing struct DInfo
> and struct DXInfo structs) in struct hfsplus_cat_folder and struct
> hfsplus_cat_file that are written into directly, so the compiler can
> correctly reason about the expected size of the writes.
> 
> "pahole" shows no size nor member offset changes to struct
> hfsplus_cat_folder nor struct hfsplus_cat_file.  "objdump -d" shows no
> object code changes.
> 
> Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
> ---

Looks good.
Acked-by: Christian Brauner <christian.brauner@xxxxxxxxxx>



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux