In the Linux kernel, the following vulnerability has been resolved:
fpga: fix potential null pointer deref in fpgamgrtestimgload_sgt()
fpgamgrtestimgloadsgt() allocates memory for sgt using kunitkzalloc() however it does not check if the allocation failed. It then passes sgt to sgalloctable(), which passes it to _sgalloc_table(). This function calls memset() on sgt in an attempt to zero it out. If the allocation fails then sgt will be NULL and the memset will trigger a NULL pointer dereference.
Fix this by checking the allocation with KUNITASSERTNOTERROR_NULL().