]> git.ipfire.org Git - thirdparty/suricata.git/commit
smb: fix file reopening issue 8223/head
authorVictor Julien <vjulien@oisf.net>
Wed, 30 Nov 2022 05:44:40 +0000 (06:44 +0100)
committerVictor Julien <vjulien@oisf.net>
Wed, 30 Nov 2022 05:48:24 +0000 (06:48 +0100)
commit45eb038e63604766de2828f6f25d145fea040424
tree6b255eec8091535c05bbedfe8486b7f01657e840
parent9ed65907a76a3a089dc78ad8bf2d74aafd593827
smb: fix file reopening issue

Fuzzing highlighted an issue where a command sequence on the same file
id triggered a logging issue:

file data for id N
close id N
file data for id N

If this happened in a single blob of data passed to the parser, the
existing file tx would be reused, the file "reopened", confusing the
file logging logic. This would trigger a debug assert.

This patch makes sure a new file tx is created for the file data
coming in after the first file tx is closed.

Bug: #5567.
rust/src/smb/files.rs
rust/src/smb/smb1.rs
rust/src/smb/smb2.rs