All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: stable@vger.kernel.org
Cc: Theodore Ts'o <tytso@mit.edu>, Jiri Slaby <jslaby@suse.cz>
Subject: [patch added to 3.12-stable] ext4: fix fencepost in s_first_meta_bg validation
Date: Mon,  6 Mar 2017 10:09:14 +0100	[thread overview]
Message-ID: <20170306090936.30522-2-jslaby@suse.cz> (raw)
In-Reply-To: <20170306090936.30522-1-jslaby@suse.cz>

From: Theodore Ts'o <tytso@mit.edu>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 2ba3e6e8afc9b6188b471f27cf2b5e3cf34e7af2 upstream.

It is OK for s_first_meta_bg to be equal to the number of block group
descriptor blocks.  (It rarely happens, but it shouldn't cause any
problems.)

https://bugzilla.kernel.org/show_bug.cgi?id=194567

Fixes: 3a4b77cd47bb837b8557595ec7425f281f2ca1fe
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 fs/ext4/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index a263fa90edfa..7bc05f7bb2a7 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3853,7 +3853,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 	db_count = (sbi->s_groups_count + EXT4_DESC_PER_BLOCK(sb) - 1) /
 		   EXT4_DESC_PER_BLOCK(sb);
 	if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_META_BG)) {
-		if (le32_to_cpu(es->s_first_meta_bg) >= db_count) {
+		if (le32_to_cpu(es->s_first_meta_bg) > db_count) {
 			ext4_msg(sb, KERN_WARNING,
 				 "first meta block group too large: %u "
 				 "(group descriptor block count %u)",
-- 
2.12.0

  reply	other threads:[~2017-03-06  9:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06  9:09 [patch added to 3.12-stable] ext4: validate s_first_meta_bg at mount time Jiri Slaby
2017-03-06  9:09 ` Jiri Slaby [this message]
2017-03-06  9:09 ` [patch added to 3.12-stable] ocfs2: do not write error flag to user structure we cannot copy from/to Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] 6lowpan: release device on error path Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] mfd: pm8921: Potential NULL dereference in pm8921_remove() Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] Staging: vt6655-6: potential NULL dereference in hostap_disable_hostapd() Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] drm/nv50/disp: min/max are reversed in nv50_crtc_gamma_set() Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] cpufreq: fix garbage kobjects on errors during suspend/resume Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] cpufreq: remove sysfs files for CPUs which failed to come back after resume Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] cpufreq: Clean up after a failing light-weight initialization Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] cpufreq: preserve user_policy across suspend/resume Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] ipv6: fix the use of pcpu_tstats in ip6_tunnel Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] net: 6lowpan: fix lowpan_header_create non-compression memcpy call Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] ipv6: simplify detection of first operational link-local address on interface Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] net: sctp: rework multihoming retransmission path selection to rfc4960 Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] vti4: Don't count header length twice Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] PCI: mvebu: Use max_t() instead of max(resource_size_t,) Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] PCI: mvebu: split PCIe BARs into multiple MBus windows when needed Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] gianfar: Check if phydev present on ethtool -A Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] net: filter: x86: fix JIT address randomization Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] net: filter: s390: " Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] USB: cdc-acm: fix double usb_autopm_put_interface() in acm_port_activate() Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] USB: cdc-acm: fix open and suspend race Jiri Slaby
2017-03-06  9:09 ` [patch added to 3.12-stable] USB: cdc-acm: fix failed open not being detected Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170306090936.30522-2-jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=stable@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.