In the Linux kernel, the following vulnerability has been resolved: of: overlay: Call ofchangesetinit() early When ofoverlayfdtapply() fails, the changeset may be partially applied, and the caller is still expected to call ofoverlayremove() to clean up this partial state. However, ofoverlayapply() calls ofresolvephandles() before initoverlaychangeset(). Hence if the overlay fails to apply due to an unresolved symbol, the overlaychangeset.cset.entries list is still uninitialized, and cleanup will crash with a NULL-pointer dereference in overlayremovalisok(). Fix this by moving the call to ofchangesetinit() from initoverlaychangeset() to ofoverlayfdtapply(), where all other early initialization is done.