summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorArthur Kiyanovski <akiyano@amazon.com>2026-05-07 03:35:15 +0300
committerJakub Kicinski <kuba@kernel.org>2026-05-12 03:22:48 +0300
commit24a08d7d6218d60c033015cf4870b6096446e734 (patch)
treeafe575b984ea59952193c07ee28a4ae4426ae6cb /scripts
parente174929793195e0cd6a4adb0cad731b39f9019b4 (diff)
downloadlinux-24a08d7d6218d60c033015cf4870b6096446e734.tar.xz
net: ena: PHC: Check return code before setting timestamp output
ena_phc_gettimex64() is setting the output parameter regardless of whether ena_com_phc_get_timestamp() succeeded or failed. When ena_com_phc_get_timestamp() returns an error, the timestamp parameter may contain uninitialized stack memory (e.g., when PHC is disabled or in blocked state) or invalid hardware values. Passing these to userspace via the PTP ioctl is both a security issue (information leak) and a correctness bug. Fix by checking the return code after releasing the lock and only setting the output timestamp on success. Fixes: e0ea34158ee8 ("net: ena: Add PHC support in the ENA driver") Cc: stable@vger.kernel.org Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Link: https://patch.msgid.link/20260507003518.22554-1-akiyano@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions