In the Linux kernel, the following vulnerability has been resolved: crypto: comp - Use same definition of context alloc and free ops In commit 42d9f6c77479 ("crypto: acomp - Move scomp stream allocation code into acomp"), the cryptoacompstreams struct was made to rely on having the allocctx and freectx operations defined in the same order as the scompalg struct. But in that same commit, the allocctx and freectx members of scompalg may be randomized by structure layout randomization, since they are contained in a pure ops structure (containing only function pointers). If the pointers within scompalg are randomized, but those in cryptoacompstreams are not, then the order may no longer match. This fixes the problem by removing the union from scompalg so that both cryptoacompstreams and scompalg will share the same definition of allocctx and free_ctx, ensuring they will always have the same layout.