In the Linux kernel, the following vulnerability has been resolved:
ipu3-imgu: Fix NULL pointer dereference in imgusubdevset_selection()
Calling v4l2subdevgettrycrop() and v4l2subdevgettrycompose() with a subdev state of NULL leads to a NULL pointer dereference. This can currently happen in imgusubdevset_selection() when the state passed in is NULL, as this method first gets pointers to both the "try" and "active" states and only then decides which to use.
The same issue has been addressed for imgusubdevgetselection() with commit 30d03a0de650 ("ipu3-imgu: Fix NULL pointer dereference in active selection access"). However the issue still persists in imgusubdevsetselection().
Therefore, apply a similar fix as done in the aforementioned commit to imgusubdevsetselection(). To keep things a bit cleaner, introduce helper functions for "crop" and "compose" access and use them in both imgusubdevsetselection() and imgusubdevget_selection().
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50826.json",
"cna_assigner": "Linux"
}