Skip to content

smbserver: folders with >550 files kill clients #1433

@9001

Description

@9001

Configuration

impacket version: 0.10.0
Python version: 3.10.7
Target OS: windows 10, smb2

Debug Output With Command String

./smbserver.py -username ed -password k -ts -debug -ip 192.168.123.1 -port 3945 -smb2support a /home/ed/dl (no relevant debug output) 

Additional context

ran into an issue with examples/smbserver.py trying to list large directories,

returning more than 550 files causes samba to hit an assert and crash (libsmb/cli_smb2_fnum.c(1497): response->length > state->offset), and win10 will freeze for a sec before it shows a generic <unc> is not accessible error

depending on filename-lengths etc, had to clamp the number of files to return from findFirst2 down to like 300 or so

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions