readlink does not return an error if a symbolic link points to itself, which can cause a stack overflow due to infinite recursion in the get_real_file function.
Although this type of recursive links should not exist, we discovered this issue on a real system. It can be reproduced as follows:
readlink
does not return an error if a symbolic link points to itself, which can cause a stack overflow due to infinite recursion in theget_real_file
function.Although this type of recursive links should not exist, we discovered this issue on a real system. It can be reproduced as follows:
After applying this patch:
Checklist