Steve Yang 1a287fc9c9 eal/linux: fix illegal memory access in uevent handler
'recv()' fills the 'buf', later 'strlcpy()' used to copy from this buffer.
But as coverity warns 'recv()' doesn't guarantee that 'buf' is
null-terminated, but 'strlcpy()' requires it.

Enlarge 'buf' size to 'EAL_UEV_MSG_LEN + 1' and ensure the last one can
be set to 0 when received buffer size is EAL_UEV_MSG_LEN.

CID 375864:  Memory - illegal accesses  (STRING_NULL)
Passing unterminated string "buf" to "dev_uev_parse", which expects
a null-terminated string.

Coverity issue: 375864
Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process")
Cc: stable@dpdk.org

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2022-02-27 19:12:34 +01:00
..
2022-02-22 14:47:49 +01:00
2022-02-22 14:47:49 +01:00
2021-08-17 08:37:52 +02:00
2022-02-22 14:47:41 +01:00
2022-02-27 18:58:47 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00
2021-10-24 13:37:43 +02:00
2022-02-22 13:10:39 +01:00
2022-02-22 14:47:49 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00
2021-08-17 08:37:52 +02:00
2022-02-22 14:47:49 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00