nday
CVE-2023-52705

nilfs2: fix underflow in second superblock position calculations

Linux / Linux

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

tags weakness typeinteger overflow accesslocalno user interaction productLinux kernel product typeoperating system
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.

integer overflow
CWE-191, stated by NVD's analysts
local
AV:L in CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (CVSS 3.1) from NVD's analysts
no user interaction
UI:N in CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (CVSS 3.1) from NVD's analysts
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
점수 없음

생명주기

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

요약

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

nilfs2: fix underflow in second superblock position calculations

Macro NILFS_SB2_OFFSET_BYTES, which computes the position of the second superblock, underflows when the argument device size is less than 4096 bytes. Therefore, when using this macro, it is necessary to check in advance that the device size is not less than a lower limit, or at least that underflow does not occur.

The current nilfs2 implementation lacks this check, causing out-of-bound block access when mounting devices smaller than 4096 bytes:

I/O error, dev loop0, sector 36028797018963960 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 NILFS (loop0): unable to read secondary superblock (blocksize = 1024)

In addition, when trying to resize the filesystem to a size below 4096 bytes, this underflow occurs in nilfs_resize_fs(), passing a huge number of segments to nilfs_sufile_resize(), corrupting parameters such as the number of segments in superblocks. This causes excessive loop iterations in nilfs_sufile_resize() during a subsequent resize ioctl, causing semaphore ns_segctor_sem to block for a long time and hang the writer thread:

INFO: task segctord:5067 blocked for more than 143 seconds.
     Not tainted 6.2.0-rc8-syzkaller-00015-gf6feea56f66d #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:segctord        state:D stack:23456 pid:5067  ppid:2
flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5293 [inline]
 __schedule+0x1409/0x43f0 kernel/sched/core.c:6606
 schedule+0xc3/0x190 kernel/sched/core.c:6682
 rwsem_down_write_slowpath+0xfcf/0x14a0 kernel/locking/rwsem.c:1190
 nilfs_transaction_lock+0x25c/0x4f0 fs/nilfs2/segment.c:357
 nilfs_segctor_thread_construct fs/nilfs2/segment.c:2486 [inline]
 nilfs_segctor_thread+0x52f/0x1140 fs/nilfs2/segment.c:2570
 kthread+0x270/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>
...
Call Trace:
 <TASK>
 folio_mark_accessed+0x51c/0xf00 mm/swap.c:515
 __nilfs_get_page_block fs/nilfs2/page.c:42 [inline]
 nilfs_grab_buffer+0x3d3/0x540 fs/nilfs2/page.c:61
 nilfs_mdt_submit_block+0xd7/0x8f0 fs/nilfs2/mdt.c:121
 nilfs_mdt_read_block+0xeb/0x430 fs/nilfs2/mdt.c:176
 nilfs_mdt_get_block+0x12d/0xbb0 fs/nilfs2/mdt.c:251
 nilfs_sufile_get_segment_usage_block fs/nilfs2/sufile.c:92 [inline]
 nilfs_sufile_truncate_range fs/nilfs2/sufile.c:679 [inline]
 nilfs_sufile_resize+0x7a3/0x12b0 fs/nilfs2/sufile.c:777
 nilfs_resize_fs+0x20c/0xed0 fs/nilfs2/super.c:422
 nilfs_ioctl_resize fs/nilfs2/ioctl.c:1033 [inline]
 nilfs_ioctl+0x137c/0x2440 fs/nilfs2/ioctl.c:1301
 ...

This fixes these issues by inserting appropriate minimum device size checks or anti-underflow checks, depending on where the macro is used.

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

이벤트 로그

+DISCVE 공개

CVE 레코드 공개(CNA: Linux).

출처 cvelist · nday 일괄 수집 · 원본
{
  "id": 308986,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2023-52705",
  "occurred_at": "2024-05-21T15:22:54.015Z",
  "observed_at": "2026-11-13T05:38:14.046808Z",
  "is_backfill": true,
  "dedupe_key": "",
  "detail": {
    "ssvc": {
      "timestamp": "2024-05-21T17:32:06.834863Z",
      "automatable": "no",
      "exploitation": "none",
      "technical_impact": "partial"
    },
    "state": "PUBLISHED",
    "date_published": "2024-05-21T15:22:54.015Z",
    "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.