Skip to content

Conversation

@ffacs
Copy link
Contributor

@ffacs ffacs commented Apr 16, 2025

What changes were proposed in this pull request?

Fix Heap Buffer Overflow Vulnerability in LZO Decompression

Why are the changes needed?

This vulnerability has several security implications

How was this patch tested?

UT passed

Was this patch authored or co-authored using generative AI tooling?

NO

@github-actions github-actions bot added the CPP label Apr 16, 2025
@ffacs
Copy link
Contributor Author

ffacs commented Apr 16, 2025

cc @wgtmac @dongjoon-hyun

@wgtmac wgtmac changed the title [C++] Heap Buffer Overflow Vulnerability in LZO Decompression [C++] Fix Heap Buffer Overflow in LZO Decompression Apr 16, 2025
Copy link
Member

@wgtmac wgtmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

0x00, // token: extended literal length
0xFF, // extension byte 1

// Literal data: only 10 bytes far less than 273
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why magic number 273?

Copy link
Contributor Author

@ffacs ffacs Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why magic number 273?

Simply a large enough number that comes from 0x00 0xff.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @ffacs and @wgtmac .

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM.

@dongjoon-hyun dongjoon-hyun changed the title [C++] Fix Heap Buffer Overflow in LZO Decompression ORC-1879: [C++] Fix Heap Buffer Overflow in LZO Decompression Apr 17, 2025
dongjoon-hyun pushed a commit that referenced this pull request Apr 17, 2025
### What changes were proposed in this pull request?
Fix Heap Buffer Overflow Vulnerability in LZO Decompression

### Why are the changes needed?
This vulnerability has several security implications

### How was this patch tested?
UT passed

### Was this patch authored or co-authored using generative AI tooling?
NO

Closes #2191 from ffacs/main.

Authored-by: ffacs <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 6b78a0d)
Signed-off-by: Dongjoon Hyun <[email protected]>
dongjoon-hyun pushed a commit that referenced this pull request Apr 17, 2025
### What changes were proposed in this pull request?
Fix Heap Buffer Overflow Vulnerability in LZO Decompression

### Why are the changes needed?
This vulnerability has several security implications

### How was this patch tested?
UT passed

### Was this patch authored or co-authored using generative AI tooling?
NO

Closes #2191 from ffacs/main.

Authored-by: ffacs <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 6b78a0d)
Signed-off-by: Dongjoon Hyun <[email protected]>
@dongjoon-hyun
Copy link
Member

Merged to main/2.1/2.0.

Could you make two backport PRs for branch-1.9 and branch-1.8, please, @ffacs ?

@dongjoon-hyun
Copy link
Member

Oh, BTW, I created a new JIRA (ORC-1879) because this PR didn't have a proper JIRA ID in the PR title. However, now, I realized that @ffacs created ORC-1878 before making this PR.

ffacs added a commit that referenced this pull request Apr 22, 2025
### What changes were proposed in this pull request?
Fix Heap Buffer Overflow Vulnerability in LZO Decompression

### Why are the changes needed?
This vulnerability has several security implications

### How was this patch tested?
UT passed

### Was this patch authored or co-authored using generative AI tooling?
NO

Closes #2191 from ffacs/main.

Authored-by: ffacs <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
ffacs added a commit to ffacs/orc that referenced this pull request Apr 22, 2025
### What changes were proposed in this pull request?
Fix Heap Buffer Overflow Vulnerability in LZO Decompression

### Why are the changes needed?
This vulnerability has several security implications

### How was this patch tested?
UT passed

### Was this patch authored or co-authored using generative AI tooling?
NO

Closes apache#2191 from ffacs/main.

Authored-by: ffacs <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
@ffacs
Copy link
Contributor Author

ffacs commented Apr 22, 2025

Merged to main/2.1/2.0.

Could you make two backport PRs for branch-1.9 and branch-1.8, please, @ffacs ?

Sorry I just saw this message now. There are the PRs
#2198 #2199

ffacs added a commit to ffacs/orc that referenced this pull request Apr 28, 2025
### What changes were proposed in this pull request?
Fix Heap Buffer Overflow Vulnerability in LZO Decompression

### Why are the changes needed?
This vulnerability has several security implications

### How was this patch tested?
UT passed

### Was this patch authored or co-authored using generative AI tooling?
NO

Closes apache#2191 from ffacs/main.

Authored-by: ffacs <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants