Comments (4)
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.
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.
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.
Added safe guard in 6a5ee82. Closing issue.
from liblnk.
Related Issues (20)
- AddressSanitizer: invalid read at libfwsi/libfwsi_uri_values.c:402 HOT 1
- AddressSanitizer: heap-buffer-overflow at shell_items.c:1282 HOT 1
- AddressSanitizer: heap-buffer-overflow at shell_items.c:294 HOT 1
- AddressSanitizer: heap-buffer-overflow at shell_items.c:367 HOT 1
- AddressSanitizer: heap-use-after-free at libfwsi/libfwsi_file_entry.c:279 HOT 4
- liblnk_io_handle_read_data_blocks does not check data size before reading 4 byte signature HOT 3
- Incorrect and misleading security advisories CVE-2018-12096, CVE-2018-12097 and CVE-2018-12098
- unable to compile HEAD HOT 3
- OOB read of 1 in libfwsi/libfwsi_item_list.c:261 HOT 4
- OOB read of 1 in liblnk_location_information.c:595 HOT 6
- How can I get mac address from this tool ? HOT 2
- Incorrect use of network_share_name_offset for device_name in liblnk_location_information.c HOT 6
- OOB read of 1 in liblnk_location_information.c#L1090 causes ASAN warning HOT 8
- liblnk liblnk_file_get_show_window_value() fetches file size not window value HOT 2
- How do you install and use this? HOT 3
- Cygwin compilation doesn't produce cyglnk-1.dll HOT 1
- lnkinfo: string in metadata property store data block is not shown HOT 18
- Support for property streams and SIDs HOT 2
- Support for detecting trailing non-LNK data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liblnk.