checkpoint-restore / criu

Checkpoint/Restore tool
criu.org
Other
2.76k stars 559 forks source link

net: Fix TOCTOU race condition in unix_conf_op #2413

Closed avagin closed 1 month ago

avagin commented 1 month ago

The unix_conf_op function reads the size of the sysctl entry array twice. gcc thinks that it can lead to a time-of-check to time-of-use (TOCTOU) race condition if the array size changes between the two reads.

Fixes #2398

rst0git commented 1 month ago

@avagin Would you be able to add a "Signed-off-by" line in the commit message?

avagin commented 1 month ago

@avagin Would you be able to add a "Signed-off-by" line in the commit message?

Done. Thanks.