atm: clip: Fix infinite recursive call of clip_push().
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 024876b247a882972095b22087734dcd23396a4e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
atm: clip: Fix infinite recursive call of clip_push().
syzbot reported the splat below. [0]
This happens if we call ioctl(ATMARP_MKIP) more than once.
During the first call, clip_mkip() sets clip_push() to vcc->push(), and the second call copies it to clip_vcc->old_push().
Later, when the socket is close()d, vcc_destroy_socket() passes NULL skb to clip_push(), which calls clip_vcc->old_push(), triggering the infinite recursion.
Let's prevent the second ioctl(ATMARP_MKIP) by checking vcc->user_back, which is allocated by the first call as clip_vcc.
Note also that we use lock_sock() to prevent racy calls.
From the CVE record · Linux
The Linux kernel's ATM CLIP code can enter infinite recursion if ioctl(ATMARP_MKIP) is called more than once on a socket. When that socket is closed, the recursion can exhaust the kernel stack. The reported trigger involves local socket operations; the input does not specify authentication requirements or user interaction.
Engineers running Linux kernels with ATM CLIP support should check their kernel versions against the vendor advisory; affected versions are not listed in the input.