The vulnerability stems from Kubernetes creating container log directories on Windows nodes with default permissions that were too permissive, allowing BUILTIN\Users to read and NT AUTHORITY\Authenticated Users to modify logs. The patches address this by introducing Windows-specific permission-setting logic using SetNamedSecurityInfo and related Windows APIs. This new logic is encapsulated in pkg/util/filesystem.Chmod and pkg/util/filesystem.MkdirAll for Windows.
The identified vulnerable functions are those that, prior to the patch, were responsible for creating these log directories (or other relevant directories) using os.MkdirAll or similar calls without subsequently applying the correct restrictive ACLs on Windows.
(*Kubelet).setupDataDirs directly called os.MkdirAll for log directories and others; these calls were replaced by utilfs.MkdirAll.
(*Kubelet).initializeModules (or setupDataDirs in some versions) lacked an explicit step to set permissions on ContainerLogsDir for Windows; this was added.
NewKubeGenericRuntimeManager created podLogsRootDirectory and lacked a step to set correct Windows permissions; this was added.
(*DefaultFs).MkdirAll was a wrapper that previously called os.MkdirAll directly; it was changed to use the new Windows-aware MkdirAll from the same package.
These functions, in their pre-patch state, would lead to the creation of directories with insecure default permissions on Windows.