Skip to content

fix(compressor): fixing an overflow that could potentially smuggle query in from data#1041

Merged
SpencerTorres merged 2 commits intomainfrom
fix_potential_overflow
Feb 14, 2025
Merged

fix(compressor): fixing an overflow that could potentially smuggle query in from data#1041
SpencerTorres merged 2 commits intomainfrom
fix_potential_overflow

Conversation

@santrancisco
Copy link
Copy Markdown
Contributor

@santrancisco santrancisco commented Feb 13, 2025

Summary

Related - https://media.defcon.org/DEF%20CON%2032/DEF%20CON%2032%20presentations/DEF%20CON%2032%20-%20Paul%20Gerste%20-%20SQL%20Injection%20Isn%27t%20Dead%20Smuggling%20Queries%20at%20the%20Protocol%20Level.pdf

It is possible to smuggle query packet into the connection when a large amount of attacker controlled data can end up in the external data of query. If Compression: CompressionNone and this overflow occurs, the remainder of the external data is processed as native protocol bytes.

@SpencerTorres SpencerTorres self-assigned this Feb 13, 2025
Copy link
Copy Markdown
Member

@SpencerTorres SpencerTorres left a comment

Choose a reason for hiding this comment

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

Appreciate the info, given the potential problems this causes I've added a comment that links back to this PR, just so it doesn't get accidentally removed in the future.

I also removed the capacity check since the slice would be appropriately resized in the prior logic

@SpencerTorres SpencerTorres changed the title Fixing an overflow that could potentially smuggle query in from data … security(compressor): fixing an overflow that could potentially smuggle query in from data Feb 14, 2025
@SpencerTorres
Copy link
Copy Markdown
Member

had to force push to fix commit lint, all good now

@SpencerTorres SpencerTorres changed the title security(compressor): fixing an overflow that could potentially smuggle query in from data fix(compressor): fixing an overflow that could potentially smuggle query in from data Feb 14, 2025
@SpencerTorres SpencerTorres merged commit 0e83566 into main Feb 14, 2025
19 checks passed
@SpencerTorres SpencerTorres deleted the fix_potential_overflow branch February 14, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants