atm: clip: Fix memory leak of struct clip_vcc.
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 9f771816f14da6d6157a8c30069091abf6b566fb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
atm: clip: Fix memory leak of struct clip_vcc.
ioctl(ATMARP_MKIP) allocates struct clip_vcc and set it to vcc->user_back.
The code assumes that vcc_destroy_socket() passes NULL skb to vcc->push() when the socket is close()d, and then clip_push() frees clip_vcc.
However, ioctl(ATMARPD_CTRL) sets NULL to vcc->push() in atm_init_atmarp(), resulting in memory leak.
Let's serialise two ioctl() by lock_sock() and check vcc->push() in atm_init_atmarp() to prevent memleak.
From the CVE record · Linux
The Linux kernel’s ATM CLIP code can leak memory allocated for a clip_vcc structure. The leak can occur when local ioctl calls set up an ATM CLIP connection and then initialize ATMARP control; the input does not specify authentication requirements.
Engineers running Linux kernels with ATM CLIP support should check whether their kernel includes the fix; affected versions are not specified.