Closed HorizontalCar closed 1 month ago
Hello,
I have been testing automated firmware testing tools on this firmware and found inputs that result in minor crashes. Specifically, there are missing argc checks resulting in null pointer dereferences in the following areas:
lfs argv[0] can be null resulting in a null pointer dereference in strcmp https://github.com/oresat/oresat-firmware/blob/dff1094dba17f24569f07f36d699d12309de88ae/src/f4/app_cantest/source/test_lfs.c#L19 time UTC argv[1] can be null resulting in a null pointer dereference in strcmp https://github.com/oresat/oresat-firmware/blob/dff1094dba17f24569f07f36d699d12309de88ae/src/f4/app_cantest/source/test_time.c#L43 time scet argv[1] can be null resulting in a null pointer dereference in strcmp https://github.com/oresat/oresat-firmware/blob/dff1094dba17f24569f07f36d699d12309de88ae/src/f4/app_cantest/source/test_time.c#L32 time unix argv[1] can be null resulting in a null pointer dereference in strcmp https://github.com/oresat/oresat-firmware/blob/dff1094dba17f24569f07f36d699d12309de88ae/src/f4/app_cantest/source/test_time.c#L20
argv[0]
strcmp
argv[1]
With #99 we dropping support for F4 apps
With https://github.com/oresat/oresat-firmware/pull/99 we dropping support for F4 apps
Hello,
I have been testing automated firmware testing tools on this firmware and found inputs that result in minor crashes. Specifically, there are missing argc checks resulting in null pointer dereferences in the following areas:
lfs
argv[0]
can be null resulting in a null pointer dereference instrcmp
https://github.com/oresat/oresat-firmware/blob/dff1094dba17f24569f07f36d699d12309de88ae/src/f4/app_cantest/source/test_lfs.c#L19 time UTCargv[1]
can be null resulting in a null pointer dereference instrcmp
https://github.com/oresat/oresat-firmware/blob/dff1094dba17f24569f07f36d699d12309de88ae/src/f4/app_cantest/source/test_time.c#L43 time scetargv[1]
can be null resulting in a null pointer dereference instrcmp
https://github.com/oresat/oresat-firmware/blob/dff1094dba17f24569f07f36d699d12309de88ae/src/f4/app_cantest/source/test_time.c#L32 time unixargv[1]
can be null resulting in a null pointer dereference instrcmp
https://github.com/oresat/oresat-firmware/blob/dff1094dba17f24569f07f36d699d12309de88ae/src/f4/app_cantest/source/test_time.c#L20