FreeBSD Bugzilla – Attachment 165290 Details for
Bug 206056
[ext2fs][patch][panic] EXT4: mount panic from freeing invalid pointers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Preventing a panic when pointers from struct ext2mount's um_e2fs are freed
ext4-mount-panic.txt (text/plain), 816 bytes, created by
Damjan Jovanovic
on 2016-01-09 05:16:32 UTC
(
hide
)
Description:
Preventing a panic when pointers from struct ext2mount's um_e2fs are freed
Filename:
MIME Type:
Creator:
Damjan Jovanovic
Created:
2016-01-09 05:16:32 UTC
Size:
816 bytes
patch
obsolete
>commit a6e9901a3c0596b8e2a2b9a3c0da61d563833b14 >Author: Damjan Jovanovic <damjan.jov@gmail.com> >Date: Sat Jan 9 07:08:41 2016 +0200 > > Zero out the memory for struct ext2mount's um_e2fs, preventing a > possible panic when pointers from it are later freed. > >diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c >index ce943ea..5339aa2 100644 >--- a/sys/fs/ext2fs/ext2_vfsops.c >+++ b/sys/fs/ext2fs/ext2_vfsops.c >@@ -590,7 +590,7 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp) > * while Linux keeps the super block in a locked buffer. > */ > ump->um_e2fs = malloc(sizeof(struct m_ext2fs), >- M_EXT2MNT, M_WAITOK); >+ M_EXT2MNT, M_WAITOK | M_ZERO); > ump->um_e2fs->e2fs = malloc(sizeof(struct ext2fs), > M_EXT2MNT, M_WAITOK); > mtx_init(EXT2_MTX(ump), "EXT2FS", "EXT2FS Lock", MTX_DEF);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 206056
: 165290