Centos-kernel-stream-9/fs
Lucas Zampieri 4896ebe3d2 Merge: pstore/ram: Fix crash when setting number of cpus to an odd number
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3922

JIRA: https://issues.redhat.com/browse/RHEL-29473  
CVE: CVE-2023-52619  
  
commit d49270a04623ce3c0afddbf3e984cb245aa48e9c  
Author: Weichen Chen <weichen.chen@mediatek.com>  
Date:   Fri Feb 24 10:36:32 2023 +0800  
  
    pstore/ram: Fix crash when setting number of cpus to an odd number  
  
    When the number of cpu cores is adjusted to 7 or other odd numbers,  
    the zone size will become an odd number.  
    The address of the zone will become:  
        addr of zone0 = BASE  
        addr of zone1 = BASE + zone_size  
        addr of zone2 = BASE + zone_size*2  
        ...  
    The address of zone1/3/5/7 will be mapped to non-alignment va.  
    Eventually crashes will occur when accessing these va.  
  
    So, use ALIGN_DOWN() to make sure the zone size is even  
    to avoid this bug.  
  
    Signed-off-by: Weichen Chen <weichen.chen@mediatek.com>  
    Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>  
    Tested-by: "Guilherme G. Piccoli" <gpiccoli@igalia.com>  
    Link: https://lore.kernel.org/r/20230224023632.6840-1-weichen.chen@mediatek.com  
    Signed-off-by: Kees Cook <keescook@chromium.org>  
  
Signed-off-by: Lenny Szubowicz <lszubowi@redhat.com>

Approved-by: Desnes Nunes <desnesn@redhat.com>
Approved-by: Steve Best <sbest@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>

Merged-by: Lucas Zampieri <lzampier@redhat.com>
2024-07-29 19:16:35 +00:00
..
9p use less confusing names for iov_iter direction initializers 2024-05-15 13:56:26 +08:00
adfs fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
affs fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
afs afs: Don't cross .backup mountpoint from backup volume 2024-06-25 11:18:30 -03:00
autofs dentry: switch the lists of children to hlist 2024-04-17 09:46:42 +08:00
befs fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
bfs fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
btrfs backing_dev: remove current->backing_dev_info 2024-04-17 10:04:36 +08:00
cachefiles cachefiles: fix memory leak in cachefiles_add_cache() 2024-06-10 18:08:11 +02:00
ceph Merge: ceph: switch to corrected encoding of max_xattr_size in mdsmap 2024-05-03 12:43:29 +02:00
coda dentry: switch the lists of children to hlist 2024-04-17 09:46:42 +08:00
configfs
cramfs mm: replace vma->vm_flags direct modifications with modifier calls 2024-04-29 14:33:17 -04:00
crypto fscrypt: Replace 1-element array with flexible array 2024-03-26 08:40:58 +08:00
debugfs fs: debugfs: Add write functionality to debugfs blobs 2024-07-11 16:51:16 -04:00
devpts
dlm Merge: net: visibility patches 2024-01-02 10:35:00 -05:00
ecryptfs
efivarfs efivarfs: force RO when remounting if SetVariable is not supported 2024-06-14 01:28:25 +02:00
efs fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
erofs erofs: Mark erofs mounting as tech-preview 2023-11-21 15:01:24 +01:00
exfat fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
exportfs exportfs: remove kernel-doc warnings in exportfs 2023-12-02 05:12:40 -05:00
ext2 treewide: use get_random_u32_below() instead of deprecated function 2024-05-22 13:04:03 -05:00
ext4 Merge: ext4: fix mb_cache_entry's e_refcnt leak in ext4_xattr_block_cache_find() 2024-07-01 12:53:05 +00:00
f2fs filemap: Add fgf_t typedef 2024-07-12 12:34:59 -04:00
fat Merge: fs: fix kernel-infoleak CVE-2024-26901 and uninitialized field CVE-2024-26973 2024-05-22 20:01:17 +00:00
freevxfs fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
fscache use less confusing names for iov_iter direction initializers 2024-05-15 13:56:26 +08:00
fuse Merge: virtiofs: sync to upstream v6.9 2024-06-25 13:26:13 +00:00
gfs2 Merge: mm: zswap: make shrinking memcg-aware 2024-07-08 13:00:49 +00:00
hfs fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
hfsplus fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
hostfs kbuild: remove --include-dir MAKEFLAG from top Makefile 2024-03-20 09:42:57 -04:00
hpfs fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
hugetlbfs hugetlb: revert use of page_cache_next_miss() 2024-04-30 17:51:24 -06:00
iomap filemap: Add fgf_t typedef 2024-07-12 12:34:59 -04:00
isofs fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
jbd2 jbd2: abort journal when detecting metadata writeback error of fs dev 2024-06-05 16:34:49 +02:00
jffs2
jfs mm,jfs: move write_one_page/folio_write_one to jfs 2024-04-30 07:00:11 -04:00
kernfs kernfs: Fix spurious lockdep warning in kernfs_find_and_get_node_by_id() 2023-11-08 14:47:25 -05:00
lockd SUNRPC: discard sv_refcnt, and svc_get/svc_put 2024-06-27 08:14:42 -04:00
minix fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
netfs fs: Add FGP_WRITEBEGIN 2024-04-30 07:00:46 -04:00
nfs Merge: nfs: don't invalidate dentries on transient errors 2024-07-25 17:00:37 +00:00
nfs_common
nfsd Merge: RHEL-9.5: NFS Updates to v6.8 2024-07-16 19:40:48 +00:00
nilfs2 mm: return an ERR_PTR from __filemap_get_folio 2024-04-30 07:00:24 -04:00
nls fs/nls: make load_nls() take a const parameter 2024-03-11 18:15:05 -03:00
notify dentry: switch the lists of children to hlist 2024-04-17 09:46:42 +08:00
ntfs fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
ocfs2 jbd2: jbd2_journal_init_{dev,inode} return proper error return value 2024-06-05 16:34:48 +02:00
omfs fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
openpromfs
orangefs mm: replace vma->vm_flags direct modifications with modifier calls 2024-04-29 14:33:17 -04:00
overlayfs ovl: stop using d_alloc_anon()/d_instantiate_anon() 2024-04-17 09:46:41 +08:00
proc Merge: fs/proc: do_task_stat: use sig->stats_lock to gather the threads/children stats 2024-07-23 18:49:47 +00:00
pstore Merge: pstore/ram: Fix crash when setting number of cpus to an odd number 2024-07-29 19:16:35 +00:00
qnx4 fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
qnx6 fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
quota quota: Check presence of quota operation structures instead of ->quota_read and ->quota_write callbacks 2024-07-17 07:49:46 +02:00
ramfs shmem: use ramfs_kill_sb() for kill_sb method of ramfs-based tmpfs 2024-04-30 17:51:27 -06:00
reiserfs fs: build the legacy direct I/O code conditionally 2024-04-17 10:06:51 +08:00
romfs fs,block: yield devices early 2024-04-17 10:39:09 +08:00
smb Revert "Revert "Merge: cgroup: Backport upstream cgroup commits up to v6.8"" 2024-05-18 21:38:20 -04:00
squashfs Squashfs: check the inode number is not the invalid value of zero 2024-05-17 09:25:52 -05:00
sysfs fs: sysfs: Fix reference leak in sysfs_break_active_protection() 2024-05-02 15:47:15 -04:00
sysv fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
tracefs
ubifs fscrypt: split up FS_CRYPTO_BLOCK_SIZE 2024-03-26 08:40:56 +08:00
udf fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
ufs fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
unicode
vboxsf
verity fsverity: use register_sysctl_init() to avoid kmemleak warning 2024-05-28 14:13:39 +02:00
xfs Merge: xfs: move log discard work to xfs_discard.c 2024-07-10 17:46:40 +00:00
zonefs iomap: update ki_pos in iomap_file_buffered_write 2024-04-17 10:04:41 +08:00
Kconfig shmem: prepare shmem quota infrastructure 2024-07-17 07:49:46 +02:00
Kconfig.binfmt
Makefile fs: add CONFIG_BUFFER_HEAD 2024-04-17 10:10:20 +08:00
aio.c aio: Fix incorrect usage of eventfd_signal_allowed() 2024-05-29 12:49:10 -04:00
anon_inodes.c KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory 2023-12-01 14:51:46 +01:00
attr.c
bad_inode.c vfs: open inside ->tmpfile() 2023-10-20 06:14:58 -04:00
binfmt_aout.c
binfmt_elf.c coredump, vmcore: Set p_align to 4 for PT_NOTE 2024-05-15 10:32:32 +08:00
binfmt_elf_fdpic.c coredump, vmcore: Set p_align to 4 for PT_NOTE 2024-05-15 10:32:32 +08:00
binfmt_elf_test.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
buffer.c fs: remove the nobh helpers 2024-04-30 07:00:00 -04:00
char_dev.c
compat_binfmt_elf.c
coredump.c coredump: Proactively round up to kmalloc bucket size 2024-07-10 10:52:15 -04:00
d_path.c
dax.c fsdax: force clear dirty mark if CoW 2023-06-16 10:35:49 -05:00
dcache.c list_lru: allow explicit memcg and NUMA node selection 2024-06-28 12:24:14 -04:00
direct-io.c fs: move sb_init_dio_done_wq out of direct-io.c 2024-04-17 10:06:22 +08:00
drop_caches.c
eventfd.c eventfd: Remove usage of the deprecated ida_simple_xx() API 2024-04-15 19:14:00 +02:00
eventpoll.c epoll: be better about file lifetimes 2024-06-24 16:37:12 +02:00
exec.c mm: replace vma->vm_flags direct modifications with modifier calls 2024-04-29 14:33:17 -04:00
fcntl.c
fhandle.c do_sys_name_to_handle(): use kzalloc() to fix kernel-infoleak 2024-05-03 10:53:50 +02:00
file.c file: Export receive_fd() to modules 2024-06-21 11:10:48 +08:00
file_table.c fs: use __fput_sync in close(2) 2024-04-30 21:18:18 +08:00
filesystems.c fs: simplify get_filesystem_list / get_all_fs_names 2023-09-18 15:56:06 +08:00
fs-writeback.c mm: convert mem_cgroup_css_from_page() to mem_cgroup_css_from_folio() 2024-04-29 14:33:10 -04:00
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fsopen.c
init.c fs: add a new SB_I_NOUMASK flag 2024-06-27 08:14:24 -04:00
inode.c list_lru: allow explicit memcg and NUMA node selection 2024-06-28 12:24:14 -04:00
internal.h fs: move sb_init_dio_done_wq out of direct-io.c 2024-04-17 10:06:22 +08:00
ioctl.c fs: distinguish between user initiated freeze and kernel initiated freeze 2024-04-05 11:58:48 -05:00
kernel_read_file.c
libfs.c direct_write_fallback(): on error revert the ->ki_pos update from buffered write 2024-04-17 10:33:37 +08:00
locks.c Reapply "memcg: enable accounting for file lock caches" 2024-01-19 14:50:50 -03:00
mbcache.c
mount.h
mpage.c mpage: use folios in bio end_io handler 2024-04-30 07:00:57 -04:00
namei.c Merge: audit: backport kernel audit enhancements and fixes up to upstream v6.10 2024-07-22 14:42:00 +00:00
namespace.c fs: support mapped mounts of mapped filesystems 2023-10-20 06:12:33 -04:00
nsfs.c nsfs: use d_make_root() 2024-04-17 09:46:43 +08:00
open.c fs: use __fput_sync in close(2) 2024-04-30 21:18:18 +08:00
pipe.c
pnode.c
pnode.h
posix_acl.c xattr: simplify listxattr helpers 2024-06-27 08:14:01 -04:00
proc_namespace.c
read_write.c use less confusing names for iov_iter direction initializers 2024-05-15 13:56:26 +08:00
readdir.c
remap_range.c fsdax: dedup file range to use a compare function 2023-06-16 10:35:47 -05:00
select.c
seq_file.c use less confusing names for iov_iter direction initializers 2024-05-15 13:56:26 +08:00
signalfd.c
splice.c Merge: Rebase kexec/kdump to upstream kernel v6.5 2024-05-27 13:52:25 +00:00
stack.c
stat.c fs: stat: compat: Add __ARCH_WANT_COMPAT_STAT 2024-03-20 09:42:34 -04:00
statfs.c
super.c Revert "mm: shrinkers: convert shrinker_rwsem to mutex" 2024-04-30 07:01:18 -04:00
sync.c
sysctls.c
timerfd.c
userfaultfd.c mm/userfaultfd: reset ptes when close() for wr-protected ones 2024-06-03 15:30:50 -06:00
utimes.c
xattr.c fs: don't call posix_acl_listxattr in generic_listxattr 2024-06-27 08:14:47 -04:00