[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20140504083604.7ecda0d8ace7927aa41ff98d@skynet.be>
Date: Sun, 4 May 2014 08:36:04 +0200
From: Fabian Frederick <fabf@...net.be>
To: linux-kernel <linux-kernel@...r.kernel.org>
Cc: akpm <akpm@...ux-foundation.org>, Viro <viro@...iv.linux.org.uk>
Subject: [PATCH 1/1] fs/affs/super.c: bugfix / double free
842a859db26b70
("affs: use ->kill_sb() to simplify ->put_super() and failure exits of ->mount()")
adds .kill_sb which frees sbi but doesn't remove sbi free in case of parse_options
error causing double free+random crash.
Cc: Alexander Viro <viro@...iv.linux.org.uk>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@...net.be>
---
fs/affs/super.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/affs/super.c b/fs/affs/super.c
index 6d589f2..895ac7d 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -340,8 +340,6 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
&blocksize,&sbi->s_prefix,
sbi->s_volume, &mount_flags)) {
printk(KERN_ERR "AFFS: Error parsing options\n");
- kfree(sbi->s_prefix);
- kfree(sbi);
return -EINVAL;
}
/* N.B. after this point s_prefix must be released */
--
1.8.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists