Skip to content

SMBJ PacketReader thread leak in DirectTcpTransport #1992

@apuig

Description

@apuig

The plugin leaks SMBJ PacketReader threads when Windows agent connections close unexpectedly (EC2 termination, network failures, timeouts).

The root cause looks like a bug in SMBJ library, just reported at hierynomus/smbj#882 but there are concerns about the project's maintenance:

  • Last release: v0.14.0 (2024-12-09)
  • Some PRs merged in early 2025 but not released
  • Multiple 2025 issues without response (some question project is still alive)

We could consider pushing/contributing for a new release that includes a fix, or, if no other options, explore an ugly reflection-based workaround to access the thread and call stop, though this approach is admittedly a workaround.

If anyone has more experience with this SMB lib, your advice or input would be much appreciated before I continue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions