Giter Club home page Giter Club logo

Comments (4)

joachimmetz avatar joachimmetz commented on August 19, 2024

I'll have a closer look when time permits but this looks like an OOB read of 1, flagged by ASAN because it is strict by nature.

This is definitely no Heap Buffer overflow since nothing is written.

We found Heap Buffer Overflow in lnkinfo binary and lnkinfo is complied with clang enabling ASAN.

@c0d3xpl0it can you spend a bit more time in analyzing the fuzzer results before making claims next time, thank in advance.

from liblnk.

joachimmetz avatar joachimmetz commented on August 19, 2024

POC is not considered a valid file:

liblnk_link_target_identifier_read: reading link target identifier at offset: 76 (0x0000004c)
Unable to open: issue41-1.lnk.
libfwsi_item_list_copy_from_byte_stream: byte stream too small.
liblnk_link_target_identifier_read: unable to copy byte stream to shell item list.
liblnk_file_open_read: unable to read link target identifier.
liblnk_file_open_file_io_handle: unable to read from file IO handle.
liblnk_file_open: unable to open file: issue41-1.lnk.
info_handle_open_input: unable to open input file.

from liblnk.

joachimmetz avatar joachimmetz commented on August 19, 2024

Issue is triggered by allocation of 0. Interestingly malloc(0) != NULL but apparently according to the C standard:

If the size of the space requested is zero, the behavior is implementation defined: either a null pointer is returned, or the behavior is as if the size were some nonzero value, except that the returned pointer shall not be used to access an object.

So this issue appears to be compiler dependent due to undefined standard behavior. Adding an additional safe guard.

from liblnk.

joachimmetz avatar joachimmetz commented on August 19, 2024

Added safe guard in 6a5ee82. Closing issue.

from liblnk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.