Skip to content

[CVE-2022-41848] char: pcmcia: synclink_cs: Fix use-after-free in mgslpc_ops - #804

Open
TrietHoang-DL wants to merge 1 commit into
Freescale:5.15-2.2.x-imxfrom
TrietHoang-DL:CVE-2022-41848/5.15-2.2.x-imx
Open

[CVE-2022-41848] char: pcmcia: synclink_cs: Fix use-after-free in mgslpc_ops#804
TrietHoang-DL wants to merge 1 commit into
Freescale:5.15-2.2.x-imxfrom
TrietHoang-DL:CVE-2022-41848/5.15-2.2.x-imx

Conversation

@TrietHoang-DL

@TrietHoang-DL TrietHoang-DL commented Aug 12, 2026

Copy link
Copy Markdown

A race condition may occur if the user physically removes the pcmcia device while calling ioctl() for this tty device node.

This is a race condition between the mgslpc_ioctl() function and the mgslpc_detach() function, which may eventually result in UAF.

So, add a refcount check to mgslpc_detach() to free the structure after the tty device node is close()d.

Link: https://lore.kernel.org/lkml/20220919040251.GA302541%40ubuntu/T/#rc85e751f467b3e6f9ccef92cfa7fb8a6cc50c270

A race condition may occur if the user physically removes
the pcmcia device while calling ioctl() for this tty device node.

This is a race condition between the mgslpc_ioctl() function and
the mgslpc_detach() function, which may eventually result in UAF.

So, add a refcount check to mgslpc_detach() to free the structure
after the tty device node is close()d.

Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
Link: https://lore.kernel.org/lkml/20220919040251.GA302541%40ubuntu/T/#rc85e751f467b3e6f9ccef92cfa7fb8a6cc50c270
Signed-off-by: Triet Hoang <triet.hoang@datalogic.com>
@TrietHoang-DL
TrietHoang-DL force-pushed the CVE-2022-41848/5.15-2.2.x-imx branch from cbb37a9 to 75aa3e5 Compare August 13, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants