A vulnerability in the Linux kernel's TEE subsystem allows zero-sized shared memory allocations via tee_dyn_shm_alloc_helper(). This leads to an invalid call to the page allocator, causing allocation failure and potentially a kernel panic during boot on systems with panic_on_warn enabled. The flaw is triggered by TEE_IOC_SHM_ALLOC with a zero size parameter. The issue has been resolved by rejecting zero-sized allocations.