Skip to content

Conversation

@DrewCyber
Copy link

@DrewCyber DrewCyber commented Jan 4, 2026

Fixes a critical memory management bug in the gVisor netstack integration that caused immediate application crashes due to incorrect PacketBuffer reference counting. Missing DecRef() calls were added in key packet processing paths to prevent reference count panics (Incrementing/Decrementing non-positive ref count) and SIGABRT crashes.

How to reproduce:

Run nmap port scanner against yggstack node. Result - 100% app crush.

Crash Evidence

From logcat analysis:

  • Process ID 21083 crashed at 22:04:37 with: panic: Decrementing non-positive ref count 0x4000348c60
  • Process ID 22071 crashed at 22:04:45 with: panic: Incrementing non-positive count 0x400007e7c0
  • Both crashes occurred in runtime.DefaultDispatch threads during buffer operations
  • Tombstone files generated: tombstone_23 and tombstone_24

Comment

We got this behavior on yggstack-android app (https://github.com/DrewCyber/yggstack-android) v0.1.22.
After this fix app works 100% correctly (v.0.1.23).

@basilgello
Copy link
Collaborator

Thanks for your contribution! Let me test and merge afterwards

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