From: Kamal Mostafa <kamal@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
kernel-team@lists.ubuntu.com
Cc: Jan Kara <jack@suse.cz>, Kamal Mostafa <kamal@canonical.com>
Subject: [PATCH 3.13.y-ckt 13/19] isofs: Fix unchecked printing of ER records
Date: Thu, 15 Jan 2015 14:09:49 -0800 [thread overview]
Message-ID: <1421359795-11155-14-git-send-email-kamal@canonical.com> (raw)
In-Reply-To: <1421359795-11155-1-git-send-email-kamal@canonical.com>
3.13.11-ckt14 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Kara <jack@suse.cz>
commit 4e2024624e678f0ebb916e6192bd23c1f9fdf696 upstream.
We didn't check length of rock ridge ER records before printing them.
Thus corrupted isofs image can cause us to access and print some memory
behind the buffer with obvious consequences.
Reported-and-tested-by: Carl Henrik Lunde <chlunde@ping.uio.no>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
fs/isofs/rock.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/isofs/rock.c b/fs/isofs/rock.c
index bb63254..735d752 100644
--- a/fs/isofs/rock.c
+++ b/fs/isofs/rock.c
@@ -362,6 +362,9 @@ repeat:
rs.cont_size = isonum_733(rr->u.CE.size);
break;
case SIG('E', 'R'):
+ /* Invalid length of ER tag id? */
+ if (rr->u.ER.len_id + offsetof(struct rock_ridge, u.ER.data) > rr->len)
+ goto out;
ISOFS_SB(inode->i_sb)->s_rock = 1;
printk(KERN_DEBUG "ISO 9660 Extensions: ");
{
--
1.9.1
next prev parent reply other threads:[~2015-01-15 22:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-15 22:09 [3.13.y-ckt stable] Linux 3.13.11-ckt14 stable review Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 01/19] [3.13-stable only] ipv6: fix swapped ipv4/ipv6 mtu_reduced callbacks Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 02/19] e1000e: Fix no connectivity when driver loaded with cable out Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 03/19] usb: gadget: at91_udc: move prepare clk into process context Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 04/19] [3.13-stable only] KVM: x86: Fix far-jump to non-canonical check Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 05/19] x86/tls: Validate TLS entries to protect espfix Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 06/19] userns: Check euid no fsuid when establishing an unprivileged uid mapping Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 07/19] userns: Document what the invariant required for safe unprivileged mappings Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 08/19] userns: Only allow the creator of the userns " Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 09/19] x86_64, switch_to(): Load TLS descriptors before switching DS and ES Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 10/19] isofs: Fix infinite looping over CE entries Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 11/19] batman-adv: Calculate extra tail size based on queued fragments Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 12/19] KEYS: close race between key lookup and freeing Kamal Mostafa
2015-01-15 22:09 ` Kamal Mostafa [this message]
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 14/19] x86_64, vdso: Fix the vdso address randomization algorithm Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 15/19] groups: Consolidate the setgroups permission checks Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 16/19] userns: Don't allow setgroups until a gid mapping has been setablished Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 17/19] userns: Don't allow unprivileged creation of gid mappings Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 18/19] move d_rcu from overlapping d_child to overlapping d_alias Kamal Mostafa
2015-01-15 22:09 ` [PATCH 3.13.y-ckt 19/19] deal with deadlock in d_walk() Kamal Mostafa
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=1421359795-11155-14-git-send-email-kamal@canonical.com \
--to=kamal@canonical.com \
--cc=jack@suse.cz \
--cc=kernel-team@lists.ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®