kernel: backport upstream fix for CVE-2018-5390