In the Linux kernel, the following vulnerability has been resolved:
nfc: pn533: initialize struct pn533outarg properly
struct pn533outarg used as a temporary context for outurb is not initialized properly. Its uninitialized 'phy' field can be dereferenced in error cases inside pn533out_complete() callback function. It causes the following failure:
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.2.0-rc3-next-20230110-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 RIP: 0010:pn533outcomplete.cold+0x15/0x44 drivers/nfc/pn533/usb.c:441 Call Trace: <IRQ> _usbhcdgivebackurb+0x2b6/0x5c0 drivers/usb/core/hcd.c:1671 usbhcdgivebackurb+0x384/0x430 drivers/usb/core/hcd.c:1754 dummytimer+0x1203/0x32d0 drivers/usb/gadget/udc/dummyhcd.c:1988 calltimerfn+0x1da/0x800 kernel/time/timer.c:1700 expiretimers+0x234/0x330 kernel/time/timer.c:1751 _runtimers kernel/time/timer.c:2022 [inline] _runtimers kernel/time/timer.c:1995 [inline] runtimersoftirq+0x326/0x910 kernel/time/timer.c:2035 _dosoftirq+0x1fb/0xaf6 kernel/softirq.c:571 invokesoftirq kernel/softirq.c:445 [inline] _irqexitrcu+0x123/0x180 kernel/softirq.c:650 irqexitrcu+0x9/0x20 kernel/softirq.c:662 sysvecapictimer_interrupt+0x97/0xc0 arch/x86/kernel/apic/apic.c:1107
Initialize the field with the pn533usbphy currently used.
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.