From: Fabian Frederick <[email protected]>
Subject: 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.

Signed-off-by: Fabian Frederick <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: <[email protected]>    [3.14.x]
Signed-off-by: Andrew Morton <[email protected]>
---

 fs/affs/super.c |    2 --
 1 file changed, 2 deletions(-)

diff -puN fs/affs/super.c~fs-affs-superc-bugfix-double-free fs/affs/super.c
--- a/fs/affs/super.c~fs-affs-superc-bugfix-double-free
+++ a/fs/affs/super.c
@@ -340,8 +340,6 @@ static int affs_fill_super(struct super_
                                &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 */
_
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to