CVE-2024-42318 is a vulnerability in the Linux kernel's Landlock security module where restrictions can be lost during a specific credential transfer operation. This occurs when the KEYCTL_SESSION_TO_PARENT keyctl syscall updates a parent's credentials using the cred_transfer LSM hook, which Landlock does not properly handle. As a result, a process with fork() and keyctl() syscall capabilities can remove all Landlock restrictions on itself. The issue is fixed by adding a cred_transfer hook that mirrors the existing cred_prepare hook functionality.