release 6.16.4
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
From: Theodore Ts'o <tytso@mit.edu>
|
||||
Date: Thu, 7 Aug 2025 09:35:20 -0400
|
||||
Subject: ext4: don't try to clear the orphan_present feature block device is
|
||||
r/o
|
||||
Origin: https://git.kernel.org/linus/c5e104a91e7b6fa12c1dc2d8bf84abb7ef9b89ad
|
||||
Bug-Debian: https://bugs.debian.org/1108271
|
||||
|
||||
When the file system is frozen in preparation for taking an LVM
|
||||
snapshot, the journal is checkpointed and if the orphan_file feature
|
||||
is enabled, and the orphan file is empty, we clear the orphan_present
|
||||
feature flag. But if there are pending inodes that need to be removed
|
||||
the orphan_present feature flag can't be cleared.
|
||||
|
||||
The problem comes if the block device is read-only. In that case, we
|
||||
can't process the orphan inode list, so it is skipped in
|
||||
ext4_orphan_cleanup(). But then in ext4_mark_recovery_complete(),
|
||||
this results in the ext4 error "Orphan file not empty on read-only fs"
|
||||
firing and the file system mount is aborted.
|
||||
|
||||
Fix this by clearing the needs_recovery flag in the block device is
|
||||
read-only. We do this after the call to ext4_load_and_init-journal()
|
||||
since there are some error checks need to be done in case the journal
|
||||
needs to be replayed and the block device is read-only, or if the
|
||||
block device containing the externa journal is read-only, etc.
|
||||
|
||||
Cc: stable@kernel.org
|
||||
Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1108271
|
||||
Cc: stable@vger.kernel.org
|
||||
Fixes: 02f310fcf47f ("ext4: Speedup ext4 orphan inode handling")
|
||||
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||||
---
|
||||
fs/ext4/super.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/fs/ext4/super.c
|
||||
+++ b/fs/ext4/super.c
|
||||
@@ -5414,6 +5414,8 @@ static int __ext4_fill_super(struct fs_c
|
||||
err = ext4_load_and_init_journal(sb, es, ctx);
|
||||
if (err)
|
||||
goto failed_mount3a;
|
||||
+ if (bdev_read_only(sb->s_bdev))
|
||||
+ needs_recovery = 0;
|
||||
} else if (test_opt(sb, NOLOAD) && !sb_rdonly(sb) &&
|
||||
ext4_has_feature_journal_needs_recovery(sb)) {
|
||||
ext4_msg(sb, KERN_ERR, "required journal recovery "
|
@@ -18,7 +18,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||
|
||||
--- a/fs/btrfs/super.c
|
||||
+++ b/fs/btrfs/super.c
|
||||
@@ -2622,7 +2622,7 @@ module_exit(exit_btrfs_fs)
|
||||
@@ -2625,7 +2625,7 @@ module_exit(exit_btrfs_fs)
|
||||
|
||||
MODULE_DESCRIPTION("B-Tree File System (BTRFS)");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
44
debian/patches/bugfix/all/net-ipv4-fix-regression-in-local-broadcast-routes.patch
vendored
Normal file
44
debian/patches/bugfix/all/net-ipv4-fix-regression-in-local-broadcast-routes.patch
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
From: Oscar Maes <oscmaes92@gmail.com>
|
||||
Date: Tue, 26 Aug 2025 14:17:49 +0200
|
||||
Subject: net: ipv4: fix regression in local-broadcast routes
|
||||
Origin: https://lore.kernel.org/regressions/20250826121750.8451-1-oscmaes92@gmail.com/
|
||||
|
||||
Commit 9e30ecf23b1b ("net: ipv4: fix incorrect MTU in broadcast routes")
|
||||
introduced a regression where local-broadcast packets would have their
|
||||
gateway set in __mkroute_output, which was caused by fi = NULL being
|
||||
removed.
|
||||
|
||||
Fix this by resetting the fib_info for local-broadcast packets. This
|
||||
preserves the intended changes for directed-broadcast packets.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Fixes: 9e30ecf23b1b ("net: ipv4: fix incorrect MTU in broadcast routes")
|
||||
Reported-by: Brett A C Sheffield <bacs@librecast.net>
|
||||
Closes: https://lore.kernel.org/regressions/20250822165231.4353-4-bacs@librecast.net
|
||||
Signed-off-by: Oscar Maes <oscmaes92@gmail.com>
|
||||
---
|
||||
net/ipv4/route.c | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/net/ipv4/route.c
|
||||
+++ b/net/ipv4/route.c
|
||||
@@ -2573,12 +2573,16 @@ static struct rtable *__mkroute_output(c
|
||||
!netif_is_l3_master(dev_out))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
- if (ipv4_is_lbcast(fl4->daddr))
|
||||
+ if (ipv4_is_lbcast(fl4->daddr)) {
|
||||
type = RTN_BROADCAST;
|
||||
- else if (ipv4_is_multicast(fl4->daddr))
|
||||
+
|
||||
+ /* reset fi to prevent gateway resolution */
|
||||
+ fi = NULL;
|
||||
+ } else if (ipv4_is_multicast(fl4->daddr)) {
|
||||
type = RTN_MULTICAST;
|
||||
- else if (ipv4_is_zeronet(fl4->daddr))
|
||||
+ } else if (ipv4_is_zeronet(fl4->daddr)) {
|
||||
return ERR_PTR(-EINVAL);
|
||||
+ }
|
||||
|
||||
if (dev_out->flags & IFF_LOOPBACK)
|
||||
flags |= RTCF_LOCAL;
|
108
debian/patches/bugfix/all/proc-fix-missing-pde_set_flags-for-net-proc-files.patch
vendored
Normal file
108
debian/patches/bugfix/all/proc-fix-missing-pde_set_flags-for-net-proc-files.patch
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
From: wangzijie <wangzijie1@honor.com>
|
||||
Subject: proc: fix missing pde_set_flags() for net proc files
|
||||
Date: Thu, 21 Aug 2025 18:58:06 +0800
|
||||
Origin: https://lore.kernel.org/stable/20250821105806.1453833-1-wangzijie1@honor.com/
|
||||
|
||||
To avoid potential UAF issues during module removal races, we use pde_set_flags()
|
||||
to save proc_ops flags in PDE itself before proc_register(), and then use
|
||||
pde_has_proc_*() helpers instead of directly dereferencing pde->proc_ops->*.
|
||||
|
||||
However, the pde_set_flags() call was missing when creating net related proc files.
|
||||
This omission caused incorrect behavior which FMODE_LSEEK was being cleared
|
||||
inappropriately in proc_reg_open() for net proc files. Lars reported it in this link[1].
|
||||
|
||||
Fix this by ensuring pde_set_flags() is called when register proc entry, and add
|
||||
NULL check for proc_ops in pde_set_flags().
|
||||
|
||||
[1]: https://lore.kernel.org/all/20250815195616.64497967@chagall.paradoxon.rec/
|
||||
|
||||
Fixes: ff7ec8dc1b64 ("proc: use the same treatment to check proc_lseek as ones for proc_read_iter et.al")
|
||||
Cc: stable@vger.kernel.org
|
||||
Reported-by: Lars Wendler <polynomial-c@gmx.de>
|
||||
Signed-off-by: wangzijie <wangzijie1@honor.com>
|
||||
---
|
||||
fs/proc/generic.c | 38 +++++++++++++++++++++-----------------
|
||||
1 file changed, 21 insertions(+), 17 deletions(-)
|
||||
|
||||
--- a/fs/proc/generic.c
|
||||
+++ b/fs/proc/generic.c
|
||||
@@ -364,6 +364,25 @@ static const struct inode_operations pro
|
||||
.setattr = proc_notify_change,
|
||||
};
|
||||
|
||||
+static void pde_set_flags(struct proc_dir_entry *pde)
|
||||
+{
|
||||
+ const struct proc_ops *proc_ops = pde->proc_ops;
|
||||
+
|
||||
+ if (!proc_ops)
|
||||
+ return;
|
||||
+
|
||||
+ if (proc_ops->proc_flags & PROC_ENTRY_PERMANENT)
|
||||
+ pde->flags |= PROC_ENTRY_PERMANENT;
|
||||
+ if (proc_ops->proc_read_iter)
|
||||
+ pde->flags |= PROC_ENTRY_proc_read_iter;
|
||||
+#ifdef CONFIG_COMPAT
|
||||
+ if (proc_ops->proc_compat_ioctl)
|
||||
+ pde->flags |= PROC_ENTRY_proc_compat_ioctl;
|
||||
+#endif
|
||||
+ if (proc_ops->proc_lseek)
|
||||
+ pde->flags |= PROC_ENTRY_proc_lseek;
|
||||
+}
|
||||
+
|
||||
/* returns the registered entry, or frees dp and returns NULL on failure */
|
||||
struct proc_dir_entry *proc_register(struct proc_dir_entry *dir,
|
||||
struct proc_dir_entry *dp)
|
||||
@@ -371,6 +390,8 @@ struct proc_dir_entry *proc_register(str
|
||||
if (proc_alloc_inum(&dp->low_ino))
|
||||
goto out_free_entry;
|
||||
|
||||
+ pde_set_flags(dp);
|
||||
+
|
||||
write_lock(&proc_subdir_lock);
|
||||
dp->parent = dir;
|
||||
if (pde_subdir_insert(dir, dp) == false) {
|
||||
@@ -559,20 +580,6 @@ struct proc_dir_entry *proc_create_reg(c
|
||||
return p;
|
||||
}
|
||||
|
||||
-static void pde_set_flags(struct proc_dir_entry *pde)
|
||||
-{
|
||||
- if (pde->proc_ops->proc_flags & PROC_ENTRY_PERMANENT)
|
||||
- pde->flags |= PROC_ENTRY_PERMANENT;
|
||||
- if (pde->proc_ops->proc_read_iter)
|
||||
- pde->flags |= PROC_ENTRY_proc_read_iter;
|
||||
-#ifdef CONFIG_COMPAT
|
||||
- if (pde->proc_ops->proc_compat_ioctl)
|
||||
- pde->flags |= PROC_ENTRY_proc_compat_ioctl;
|
||||
-#endif
|
||||
- if (pde->proc_ops->proc_lseek)
|
||||
- pde->flags |= PROC_ENTRY_proc_lseek;
|
||||
-}
|
||||
-
|
||||
struct proc_dir_entry *proc_create_data(const char *name, umode_t mode,
|
||||
struct proc_dir_entry *parent,
|
||||
const struct proc_ops *proc_ops, void *data)
|
||||
@@ -583,7 +590,6 @@ struct proc_dir_entry *proc_create_data(
|
||||
if (!p)
|
||||
return NULL;
|
||||
p->proc_ops = proc_ops;
|
||||
- pde_set_flags(p);
|
||||
return proc_register(parent, p);
|
||||
}
|
||||
EXPORT_SYMBOL(proc_create_data);
|
||||
@@ -634,7 +640,6 @@ struct proc_dir_entry *proc_create_seq_p
|
||||
p->proc_ops = &proc_seq_ops;
|
||||
p->seq_ops = ops;
|
||||
p->state_size = state_size;
|
||||
- pde_set_flags(p);
|
||||
return proc_register(parent, p);
|
||||
}
|
||||
EXPORT_SYMBOL(proc_create_seq_private);
|
||||
@@ -665,7 +670,6 @@ struct proc_dir_entry *proc_create_singl
|
||||
return NULL;
|
||||
p->proc_ops = &proc_single_ops;
|
||||
p->single_show = show;
|
||||
- pde_set_flags(p);
|
||||
return proc_register(parent, p);
|
||||
}
|
||||
EXPORT_SYMBOL(proc_create_single_data);
|
Reference in New Issue
Block a user