open-discussion > Buffer overflow in mricron
Apr 1, 2021  02:04 PM | Vincenzo Ciancia
Buffer overflow in mricron
Hi,

mricron (latest version, from 2019, reproduced on osx and linux) suffers from a mild buffer overflow: if the image path is too long, the image is not displayed; garbage is shown instead. This was observed on a normal installation, due to a particularly large nesting of subdirectories from an user at ISTI-CNR in Pisa.

Example to reproduce using bash and gnu find:

1) create a long path:

mkdir testPath; for i in $(seq 1 200); do mkdir $(find testPath | tail -n 1)/testPath; done


2) copy an image in the path:

cp flair.nii.gz $(find testPath/|tail -n 1)

3) open that image:

/path/to/MRIcron $(find testPath -iname "*.nii.gz")

4) Garbled content is observed instead of the image.

Threaded View

TitleAuthorDate
Buffer overflow in mricron
Vincenzo Ciancia Apr 1, 2021
Chris Rorden Apr 1, 2021