nday
CVE-2023-52741

cifs: Fix use-after-free in rdata->read_into_pages()

Linux / Linux

CVE 공개: . nday가 아직 패치 근거를 수집하지 않았습니다. 패치가 없다는 뜻은 아닙니다. PoC 출처 4곳 모두 미등재. CISA KEV 미등재.

why these tags

nday derives these tags by fixed rules from the facts below; NVD, the CNA and other sources do not assign them. Vocabulary and rules: ~/tags.

use-after-free
CWE-416, stated by NVD's analysts
remote, unauthenticated
AV:N, PR:N, UI:N in CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from the CNA Linux
network
AV:N in CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from the CNA Linux
no authentication required
PR:N in CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from the CNA Linux
no user interaction
UI:N in CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from the CNA Linux
Linux kernel
affected products in the CVE record: Linux · LinuxCPE names NVD's analysts give as vulnerable: o:linux:linux_kernel
operating system
affected products in the CVE record: Linux · LinuxCPE names NVD's analysts give as vulnerable: o:linux:linux_kernelthe product type of Linux kernel in nday's product registry
현재 단계
DIS
공개
CVSS
9.8 CRITICAL v3.1

생명주기

가로축 UTC. 점 = 분 단위, 넓은 막대 = 날짜만, 빈 표시 = 불명 또는 추정.
시점 알 수 없음
DIS공개
2024-05-21T15:23Z
PAT패치
아직 기록 없음
ANA분석
아직 기록 없음
POCPoC
아직 기록 없음
ITW악용
아직 기록 없음
KEVKEV
아직 기록 없음

요약

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.

Original text of the CVE record (cvelist), shown as published.

Exploit conditions

What an attack needs, read from the CVSS vector.
Attack vector AV:N
Network: the attacker only needs to reach it over the network
Attack complexity AC:L
Low: no special conditions; the attacker can expect repeatable success
Privileges required PR:N
None: no account or authorization needed
User interaction UI:N
None: no action by anyone other than the attacker

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CVSS 3.1 vector from the CVE record, scored by the CNA Linux.

이벤트 로그

+DISCVE 공개

CVE 레코드 공개(CNA: Linux). CVSS 9.8(치명적).

출처 cvelist · nday 일괄 수집 · 원본
{
  "id": 309021,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2023-52741",
  "occurred_at": "2024-05-21T15:23:03.867Z",
  "observed_at": "2026-11-13T05:38:14.046808Z",
  "is_backfill": true,
  "dedupe_key": "",
  "detail": {
    "cvss": {
      "source": "cna",
      "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "version": "3.1",
      "base_score": 9.8,
      "base_severity": "CRITICAL"
    },
    "ssvc": {
      "timestamp": "2024-05-28T15:46:03.268177Z",
      "automatable": "no",
      "exploitation": "none",
      "technical_impact": "partial"
    },
    "state": "PUBLISHED",
    "date_published": "2024-05-21T15:23:03.867Z",
    "assigner_short_name": "Linux"
  }
}

Report an error

report an error or omission

Something on this page wrong or missing? Tell the editors; if they accept it, this page's revision log says so publicly. Upstream data is not changed.

연구자 논의

최근 7일간 연구자 0명이 언급

목록의 연구자가 X에서 이 CVE를 언급한 게시물입니다. 원문 그대로 보여 주며 nday는 검증하지 않습니다.

명단의 연구자가 X에서 이 CVE를 언급한 게시물은 아직 수집되지 않았습니다.

Discussion

0 comments

No comments yet.