Fix xbcloud out of range memory read#1538
Conversation
|
Thank you for the contribution @imrivera ! Fix looks good. I will verify with ASAN/vaglrind tests and merge it to the next upcoming releases. |
|
Hi @imrivera, I just want to know if you reproduced this bug/behavior somehow. While I agree this is a bug from reading the code, I want to reproduce this bug. Since the default suffix name '.0000000000..' is 21 characters long, it should be impossible to get a chunk name less than this length. Please let me know if you have a way to reproduce or how you found out this bug? |
I found it just reading the code. I was trying to figure out some things about the naming scheme. |
|
@satya-bodapati any news on merging this PR? |
Fix a memory out of bounds read when
chunk_name.size() < 21- 2nd condition use negative index
- 2nd condition not evaluated
- 2nd condition using index 0, ok but useless if we want names longer than 21 chars
- 2nd condition not evaluated
- 2nd condition is not evaluated
- 2nd condition is evaluated with an index always > 0