# CVE-2023-52741: cifs: Fix use-after-free in rdata-\>read\_into\_pages()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.87% (percentile 56, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-05-21T15:23:03.867Z
- **Modified:** 2026-08-05T09:11:10.506Z

## Who should check

- Anyone running Linux \>= b3160aebb49b5e07f6bc3b8c5bed6013ca9e422e, \< 2b693fe3f760c87fd9768e759f6297f743a1b3b0; \>= b3160aebb49b5e07f6bc3b8c5bed6013ca9e422e, \< d1fba1e096ffc7ec11df863a97c50203c47315b9; \>= b3160aebb49b5e07f6bc3b8c5bed6013ca9e422e, \< 3684a2f6affa1ca52a5d4a12f04d0652efdee65e; \>= b3160aebb49b5e07f6bc3b8c5bed6013ca9e422e, \< aa5465aeca3c66fecdf7efcf554aed79b4c4b211
- Anyone running Linux 3.17

## Description

In the Linux kernel, the following vulnerability has been resolved:

cifs: Fix use-after-free in rdata-\>read\_into\_pages()

When the network status is unstable, use-after-free may occur when
read data from the server.

  BUG: KASAN: use-after-free in readpages\_fill\_pages+0x14c/0x7e0

  Call Trace:
   \<TASK\>
   dump\_stack\_lvl+0x38/0x4c
   print\_report+0x16f/0x4a6
   kasan\_report+0xb7/0x130
   readpages\_fill\_pages+0x14c/0x7e0
   cifs\_readv\_receive+0x46d/0xa40
   cifs\_demultiplex\_thread+0x121c/0x1490
   kthread+0x16b/0x1a0
   ret\_from\_fork+0x2c/0x50
   \</TASK\>

  Allocated by task 2535:
   kasan\_save\_stack+0x22/0x50
   kasan\_set\_track+0x25/0x30
   \_\_kasan\_kmalloc+0x82/0x90
   cifs\_readdata\_direct\_alloc+0x2c/0x110
   cifs\_readdata\_alloc+0x2d/0x60
   cifs\_readahead+0x393/0xfe0
   read\_pages+0x12f/0x470
   page\_cache\_ra\_unbounded+0x1b1/0x240
   filemap\_get\_pages+0x1c8/0x9a0
   filemap\_read+0x1c0/0x540
   cifs\_strict\_readv+0x21b/0x240
   vfs\_read+0x395/0x4b0
   ksys\_read+0xb8/0x150
   do\_syscall\_64+0x3f/0x90
   entry\_SYSCALL\_64\_after\_hwframe+0x72/0xdc

  Freed by task 79:
   kasan\_save\_stack+0x22/0x50
   kasan\_set\_track+0x25/0x30
   kasan\_save\_free\_info+0x2e/0x50
   \_\_kasan\_slab\_free+0x10e/0x1a0
   \_\_kmem\_cache\_free+0x7a/0x1a0
   cifs\_readdata\_release+0x49/0x60
   process\_one\_work+0x46c/0x760
   worker\_thread+0x2a4/0x6f0
   kthread+0x16b/0x1a0
   ret\_from\_fork+0x2c/0x50

  Last potentially related work creation:
   kasan\_save\_stack+0x22/0x50
   \_\_kasan\_record\_aux\_stack+0x95/0xb0
   insert\_work+0x2b/0x130
   \_\_queue\_work+0x1fe/0x660
   queue\_work\_on+0x4b/0x60
   smb2\_readv\_callback+0x396/0x800
   cifs\_abort\_connection+0x474/0x6a0
   cifs\_reconnect+0x5cb/0xa50
   cifs\_readv\_from\_socket.cold+0x22/0x6c
   cifs\_read\_page\_from\_socket+0xc1/0x100
   readpages\_fill\_pages.cold+0x2f/0x46
   cifs\_readv\_receive+0x46d/0xa40
   cifs\_demultiplex\_thread+0x121c/0x1490
   kthread+0x16b/0x1a0
   ret\_from\_fork+0x2c/0x50

The following function calls will cause UAF of the rdata pointer.

readpages\_fill\_pages
 cifs\_read\_page\_from\_socket
  cifs\_readv\_from\_socket
   cifs\_reconnect
    \_\_cifs\_reconnect
     cifs\_abort\_connection
      mid-\>callback() --\> smb2\_readv\_callback
       queue\_work(&rdata-\>work)  \# if the worker completes first,
                                 \# the rdata is freed
          cifs\_readv\_complete
            kref\_put
              cifs\_readdata\_release
                kfree(rdata)
 return rdata-\>...               \# UAF in readpages\_fill\_pages()

Similarly, this problem also occurs in the uncache\_fill\_pages().

Fix this by adjusts the order of condition judgment in the return
statement.

## Affected and fixed versions

- Linux: \>= b3160aebb49b5e07f6bc3b8c5bed6013ca9e422e, \< 2b693fe3f760c87fd9768e759f6297f743a1b3b0; \>= b3160aebb49b5e07f6bc3b8c5bed6013ca9e422e, \< d1fba1e096ffc7ec11df863a97c50203c47315b9; \>= b3160aebb49b5e07f6bc3b8c5bed6013ca9e422e, \< 3684a2f6affa1ca52a5d4a12f04d0652efdee65e; \>= b3160aebb49b5e07f6bc3b8c5bed6013ca9e422e, \< aa5465aeca3c66fecdf7efcf554aed79b4c4b211 (cvelist)
- Linux: 3.17 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-52741. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-52741.md
Affected: Linux >= b3160aebb49b5e07f6bc3b8c5bed6013ca9e422e, < 2b693fe3f760c87fd9768e759f6297f743a1b3b0; >= b3160aebb49b5e07f6bc3b8c5bed6013ca9e422e, < d1fba1e096ffc7ec11df863a97c50203c47315b9; >= b3160aebb49b5e07f6bc3b8c5bed6013ca9e422e, < 3684a2f6affa1ca52a5d4a12f04d0652efdee65e; >= b3160aebb49b5e07f6bc3b8…
Fixed in: Linux 2b693fe3f760c87fd9768e759f6297f743a1b3b0, Linux 3684a2f6affa1ca52a5d4a12f04d0652efdee65e

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-52741 being exploited?

There is no confirmed exploitation: CVE-2023-52741 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.87% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-52741?

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2023-52741?

Linux \>= b3160aebb49b5e07f6bc3b8c5bed6013ca9e422e, \< 2b693fe3f760c87fd9768e759f6297f743a1b3b0; \>= b3160aebb49b5e07f6bc3b8c5bed6013ca9e422e, \< d1fba1e096ffc7ec11df863a97c50203c47315b9; \>= b3160aebb49b5e07f6bc3b8c5bed6013ca9e422e, \< 3684a2f6affa1ca52a5d4a12f04d0652efdee65e; \>= b3160aebb49b5e07f6bc3b8c5bed6013ca9e422e, \< aa5465aeca3c66fecdf7efcf554aed79b4c4b211; Linux 3.17.

### Is there a fix for CVE-2023-52741?

Yes. Fixed in Linux 2b693fe3f760c87fd9768e759f6297f743a1b3b0, Linux 3684a2f6affa1ca52a5d4a12f04d0652efdee65e. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2023-52741?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/2b693fe3f760c87fd9768e759f6297f743a1b3b0>
- patch: <https://git.kernel.org/stable/c/d1fba1e096ffc7ec11df863a97c50203c47315b9>
- patch: <https://git.kernel.org/stable/c/3684a2f6affa1ca52a5d4a12f04d0652efdee65e>
- patch: <https://git.kernel.org/stable/c/aa5465aeca3c66fecdf7efcf554aed79b4c4b211>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-52741>

HTML: <https://flawdb.com/CVE-2023-52741> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-52741>
