I am currently investigating problem with attachment.js files listing. Our customer tried to send tgzed attachment which contained almost whole /var/log folder from some custom linux based machine. Attachment consists of lot of text files, folders and a lot of .gz files.
From logs what I understand this happens:
listing files in depth 1 with bsdtar -tf ...
extracting multiple .gz files to tmps with bsdtar -Oxf ... --include ...gz
listing bsdtar -tf /tmp/... fails for whatever reason (I think bsdtar can't list inside .gz files actually) and calls cb
... since cb is called haraka continues to another plugins
but since recursive listing is in for loop another bsdtar -tf /tmp/... is called and again cb is called
and we are in mess now, attachment.js generated fd's are closing, another plugins continues in same time
[CRIT] [-] [core] Error: EBADF: bad file descriptor, close
[NOTICE] [-] [core] Shutting down
Sadly I can't attach file - full of private informations. Can't replicate either - I think file must have structure and size to hit this issue and start race condition. Also I am not sure how to fix this issue without ditch whole plugin structure and handle recursivness in different way
I am currently investigating problem with attachment.js files listing. Our customer tried to send tgzed attachment which contained almost whole /var/log folder from some custom linux based machine. Attachment consists of lot of text files, folders and a lot of .gz files.
From logs what I understand this happens:
Sadly I can't attach file - full of private informations. Can't replicate either - I think file must have structure and size to hit this issue and start race condition. Also I am not sure how to fix this issue without ditch whole plugin structure and handle recursivness in different way