Skip to content

Possible double-free on ext2fs_file_close() #43

Description

@jhermsmeier
75.1 % (5212 MB)
*** Error in `node': double free or corruption (out): 0x00007f6bf0000980 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f6c1b9167e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f6c1b91f37a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f6c1b92353c]
/home/jonas/Work/node-ext2fs/build/Release/bindings.node(ext2fs_file_close+0x33)[0x7f6c19674223]
/home/jonas/Work/node-ext2fs/build/Release/bindings.node(_ZN11CloseWorker7ExecuteEv+0x18)[0x7f6c196660f8]
node[0x9e3721]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f6c1bc706ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f6c1b9a641d]

Looking at the implementation of ext2fs_file_close(), it seems it can double-free the ext2_file_t file if called twice on the same file structure

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions