In the Linux kernel, the following vulnerability has been resolved:
udmabuf: validate ubuf->pagecount
Syzbot has reported GPF in sgallocappendtablefrompages(). The problem was in ubuf->pages == ZEROPTR.
ubuf->pagecount is calculated from arguments passed from user-space. If user creates udmabuf with list.size == 0 then ubuf->pagecount will be also equal to zero; it causes kmallocarray() to return ZEROPTR.
Fix it by validating ubuf->pagecount before passing it to kmalloc_array().