smbserver: folders with >550 files kill clients
9001 opened this issue · comments
ed commented
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