]> git.ipfire.org Git - thirdparty/qemu.git/commit
migration: fix-possible-int-overflow
authorDmitry Frolov <frolov@swemel.ru>
Wed, 13 Nov 2024 14:05:01 +0000 (17:05 +0300)
committerPeter Xu <peterx@redhat.com>
Wed, 13 Nov 2024 18:02:46 +0000 (13:02 -0500)
commit0926c002c7c71749a781de13f28b0481e029d323
treed72866324b384398ec9265c318ca77702c0e6d3e
parent4daff81efb381d1138832648511218a646f8092e
migration: fix-possible-int-overflow

stat64_add() takes uint64_t as 2nd argument, but both
"p->next_packet_size" and "p->packet_len" are uint32_t.
Thus, theyr sum may overflow uint32_t.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
Link: https://lore.kernel.org/r/20241113140509.325732-2-frolov@swemel.ru
Signed-off-by: Peter Xu <peterx@redhat.com>
migration/multifd.c