[dpdk-stable] [PATCH 18.11] examples/fips_validation: fix buffer overflow

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 17:40:29 CET 2020


On 02/12/2020 14:39, Olivier Matz wrote:
> [ upstream commit 9275af3bd9faa0337b418736bb622704d158fbac ]
> 
> If the file name is larger than MAX_STRING_SIZE (64), strcpy()
> will overwrite the content of memory.
> 
> Replace strcpy() by rte_strscpy(), check its return value, and
> increase file_name size to 256.
> 
> Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
> Acked-by: Fan Zhang <roy.fan.zhang at intel.com>
> 
> Conflicts:
> 	examples/fips_validation/fips_validation.c
> 	examples/fips_validation/fips_validation.h
> 
> Most of the original commit has been removed, because a part of the
> issue was introduced by commit efe3a8dbb66e ("examples/fips_validation:
> support TDES ECB"), and it is not present in this branch.
> 
> Only the length check on the device name remains.
> 
> Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>

Applied, thanks.



More information about the stable mailing list