Skip to content

ELFCore: Keep the permissions of the mappings it turns into blobs - #758

Open
zardus wants to merge 1 commit into
masterfrom
feature/fix-cle-elfcore-blob-perms
Open

zardus wants to merge 1 commit into
masterfrom
feature/fix-cle-elfcore-blob-perms

Conversation

@zardus

@zardus zardus commented Aug 17, 2026 •

Copy link
Copy Markdown
Member

THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS

Problem

A core dump records what every mapping was allowed to do, and ELFCore reads it
correctly -- then loses it on the way out. On
binaries/tests/x86_64/coredump/true-libc.so.6-ld-linux-x86-64.so.2.core, the
five mappings that do not belong to a child object become blobs, and every one of
them claims to be executable:

               segment   blob   core
0x000055555575b220    rwx    rw-
0x00007ffff7dd92c0    rwx    rw-
0x00007ffff7ffe1c8    rwx    rw-
0x00007ffffffde000    rwx    rw-
0xffffffffff600000    rwx    r-x

Those four rw- mappings are the heap, the ld.so and libc data segments and the
stack. Anything that asks the loader which memory is code -- CFGFast's executable
map first of all -- is told all of it is.

Root cause

ELFCore hands each mapping it could not match to a child object to Blob,
which builds a plain Segment, and Segment inherits Region's defaults:

    @property
    def is_executable(self) -> bool:
        # pylint: disable=no-self-use
        return True

That default is right for the format Blob was written for -- a raw image records
no permissions, so refusing to answer would be worse -- and wrong the moment the
caller does know them. The p_flags the core states are read, matched against
child objects, and then dropped at the one point where a Segment is constructed.

Fix

PermissionedSegment states its three permissions instead of assuming them,
Blob takes an optional permissions triple describing the memory it came from,
and ELFCore passes each mapping's flags through -- including to the leading and
trailing offcuts it makes when a mapping only partly overlaps a child, which are
parts of the same mapping and get the same flags. A blob loaded from a raw image
is unchanged, because the triple defaults to None and the old behaviour with it.

               segment   blob   core
0x000055555575b220    rw-    rw-
0x00007ffff7dd92c0    rw-    rw-
0x00007ffff7ffe1c8    rw-    rw-
0x00007ffffffde000    rw-    rw-
0xffffffffff600000    r-x    r-x

Testing

tests/test_elfcore.py::test_blob_children_keep_the_mapping_permissions compares
every blob segment of the core fixture against the program header it was cut
from, and asserts at least one is not executable; on the merge base the heap blob
reports rwx where the core says p_flags 0x6.

Fixes #743. angr/angr#6864 is the other half, where CFGFast's executable map
learns to read these permissions.

Validation: #758 (comment)

sync: angr/angr#6864

session: sharpen

@zardus

zardus commented Aug 17, 2026 •

Copy link
Copy Markdown
Member Author

THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS

Validation record for head 2b577d7d8cff27cd592dbbd9f21eba6951fdd33f against baseline 0e77ade3c39a3cee05f65051e57955675e1ac21b, with angr at 503b1be0663e65de225194eeb8e2cee6fa20d8d3 plus angr/angr#6864.

  • Regression: pytest tests/test_elfcore.py::test_blob_children_keep_the_mapping_permissions — on the baseline the heap blob at 0x55555575b220 reports rwx where the core's program header says p_flags 0x6; passes on head
  • Focused: pytest tests/test_elfcore.py tests/test_blob.py — 5 passed
  • Full suite: cle 226 passed, 9 skipped; angr 2480 passed, 46 skipped, 2 xfailed, 260 subtests; angr Rust 35 passed
  • Lint/type: run-ci-diff-checks.py --repository cle — pylint and pyright unchanged or better on every changed file
  • Workspace gate: cle and angr adopted in one feature instance; archinfo, pypcode, pyvex, claripy and angr-management skipped as unadopted and untouched — pass

Corpus A/B over 225 ELF core dumps, sampled 25 per (collection, architecture) from a private corpus of 5,250, one object per forked child and one side per child. 169 have all four runs clean; 56 fail identically on every side and are unaffected. The executable map scored against is the core's own PT_LOAD table read with pyelftools, never CLE's view of it.

baseline this change only with angr/angr#6864
CFG blocks 2,114,564 2,105,167 2,105,191
Blocks outside every PF_X PT_LOAD 10,062 7 7
Total seconds 3,062 3,122 2,028
Median seconds 0.92 0.64 0.08
Peak RSS 1,682 MB 1,680 MB 1,686 MB
  • Nothing that was decoded inside executable memory is lost: the head covers a superset of the baseline's executable bytes on every one of the 169 objects, 32,082,235 to 32,082,748 bytes. 64 objects have bit-identical block lists.
  • The 848 blocks inside executable memory that no longer exist as blocks are re-partitionings of bytes still covered; the 1,530 new blocks are all inside PF_X ranges, and on ARM core 8f47f173386a557b the 46 new ones there are the zero-filled tail of the r-x page at 0x10000, which angr scans on both sides.
  • The 7 blocks still outside are all on ARM core ad3397abc774be92, at 0xfafb-0xffff, immediately below its r-x page at 0x10000 and reached from it rather than scanned.
  • Three cores that exceeded the 600 s budget on the baseline and with this change alone complete with both halves: 621a8bb8244237e3, 0c46e3e8b635c3db, 3740f861518da260. Nothing times out that did not before.
  • Nondeterminism: repeating the head side changes one object, a69bc3dea27b1972, by one block — a 27-byte block against a 15-byte and a 12-byte one at 0x7fb421c34dd1. That is the only block-count difference not attributable to the change.
  • The head side was re-measured on 57 of the core dumps after the final revision of the angr half, which infers the same thing from the segments rather than from a new CLE attribute: bit-identical block lists and executable maps on all 57.
  • Control: 223 objects loaded with the blob backend across 63 architectures, 154 scored and 69 failing identically on both sides. Every one of the 154 has a bit-identical block list, function count and derived executable map — 924,527 blocks compared.

Caveats: corpus objects are named by architecture, container and digest because the dataset is not public; the regression uses binaries/tests/x86_64/coredump/true-libc.so.6-ld-linux-x86-64.so.2.core. One repeat run hit MDB_MAP_RESIZED from a shared RTDB directory, a harness artefact, and its object is excluded from the 169.

Corpus impact, measured after this pull request was opened

A CFGFast sweep scores every recovered block against the file's own evidence and
counts blocks that land outside the executable memory the file describes. Across
the whole run that category holds 472,106 instances, and ELF core dumps
contribute 137,411 of them, on 2,073 of the 2,118 core dumps scored — 97.9%
.
A category that fires on almost every member of a population is a systematic
modelling difference rather than thousands of independent defects, and this is
that difference.

The five heaviest contributors were fetched and their recorded sample addresses
located in each core's own program headers:

digest arch instances PT_LOADs permissions of the segment each sampled address lands in
99701519c3f9eda9 x86 1,620 21 rw- ×32
4ca4a0e10dad513a arm 393 6 rw- ×32
77039c204547bfbf arm 393 6 rw- ×32
6d9bfb41c905f99a arm 392 6 rw- ×32
88f3579d5c5220de arm 392 6 rw- ×32

160 of 160 sampled addresses sit in a PT_LOAD the core itself marks
read-write and not executable. None is in an executable segment.
That is the
behaviour this change corrects: ELFCore turns each mapping into a Blob, a
Blob reports every segment readable, writable and executable, and CFGFast
therefore decodes the process's data pages as code.

The sweep pins a CLE from before this pull request, so those figures describe the
unfixed behaviour. The corpus also puts the change in proportion against the rest
of the category: Mach-O contributes 329,861 instances and is addressed by #762,
which has merged; with that and this change accounted for, 99.0% of the
category is explained
, leaving 4,834 instances on ELF, CGC, COFF and
Universal2 as the genuinely unexplained remainder.

Reproducing needs only a core dump with writable data mappings: every block
CFGFast recovers inside one is a block recovered from data.

The other side of that comparison

The figures above are the unfixed behaviour. Re-running the same three core dumps
with this change applied, together with its companion angr/angr#6864 (sync: on
that pull request), and classifying every recovered block by the permissions of
the PT_LOAD it lands in:

digest arch blocks recovered in an r-x segment in a non-executable segment
99701519c3f9eda9 x86 9,212 9,212 0
4ca4a0e10dad513a arm 382 382 0
77039c204547bfbf arm 376 376 0

Before the change those same objects contributed 1,620, 393 and 393 findings, and
160 of 160 sampled addresses sat in a PT_LOAD the core marks read-write. After
it, none of the recovered blocks lands in a non-executable mapping at all.

Worth noting the x86 case recovers more blocks than the finding count would
suggest — 9,212 of them — and every one is inside r-x. The change does not cost
recovery; it stops recovery happening in the process's data pages.

Measured with the pair applied, because they are companions: this supplies the
permissions and #6864 reads the executable map from segments so they take effect.
Attributing the result to either alone would overstate it.

Re-keyed 2026-08-28. The figures above were measured at 6e74474182bbda0c5b8e179dee1a7d1ead9425fc on baseline 45c6509c753d07f740099035cd41f7f473dc6f31, which is the head the opening line named until now; the branch is at 8c4492f78e8b8486f1e5facc4ceed7aa28ee0893 on 46a37333f4f59b0facf8774ee743ebc4cc074e9b. git range-diff 45c6509c753d07f740099035cd41f7f473dc6f31..6e74474182bbda0c5b8e179dee1a7d1ead9425fc 46a37333f4f59b0facf8774ee743ebc4cc074e9b..8c4492f78e8b8486f1e5facc4ceed7aa28ee0893 reports every commit unchanged and git diff 6e74474182bbda0c5b8e179dee1a7d1ead9425fc 8c4492f78e8b8486f1e5facc4ceed7aa28ee0893 differs only by master's own advance (12 files changed, 353 insertions(+), 44 deletions(-)). Master touched none of the files this change touches between the two baselines.

Re-keyed again 2026-09-06. The branch was rebased from baseline 46a37333f4f59b0facf8774ee743ebc4cc074e9b onto 0e77ade3c39a3cee05f65051e57955675e1ac21b, eleven commits later, and the head moved from 8c4492f78e8b8486f1e5facc4ceed7aa28ee0893 to 907ee1ee8e9c8d68d179533c812839385b7fca23. Nothing was resolved by hand. git range-diff 46a37333f4f59b0facf8774ee743ebc4cc074e9b..8c4492f78e8b8486f1e5facc4ceed7aa28ee0893 0e77ade3c39a3cee05f65051e57955675e1ac21b..907ee1ee8e9c8d68d179533c812839385b7fca23 reports the single commit unchanged, the two merge-base diffs are byte-identical, and each of the four files this change touches carries the same blob at both heads: cle/backends/blob.py 7b6a214c, cle/backends/elf/elfcore.py 2bf0b35d, cle/backends/region.py e6d5dcba, tests/test_elfcore.py 0fad4767. None of the eleven commits touches any of those four. So the published diff has not moved.

That bounds the diff and not the loader, so the figures above do not carry over untouched: master changed cle/backends/backend.py, cle/backends/relocation.py, cle/backends/gopclntab.py, cle/backends/elf/elf.py and cle/backends/elf/metaelf.py in the same window, and ELFCore subclasses ELF. Taken again at this head — the regression still discriminates, with the heap blob at 0x55555575b220 reporting rwx on baseline 0e77ade3 and rw- at 907ee1ee, matching the table in the description; pytest tests/test_elfcore.py tests/test_blob.py is 5 passed; the full cle suite is 262 passed and 9 skipped at 907ee1ee against 261 and 9 on cle master, the one extra being this change's own new test. The corpus tables have not been re-run against this baseline.

The reason for the rebase: the previous baseline predates cle eac0e554 (#800), which reads the loading environment out of a PE optional header and sets TE.os. Without it, angr master's tests/simos/test_uefi.py fails three of its four cases against this branch, on files this change does not touch — two on assert isinstance(project.simos, SimUefi) and one with KeyError: 'Win32' at angr/simos/windows.py:58. With angr at 87411a719c96ddc3f3954590b1833b1789e19697: cle master 4 passed, this branch at 8c4492f7 3 failed and 1 passed, this branch at 907ee1ee 4 passed.

Amended 2026-09-06. The head moved from 907ee1ee8e9c8d68d179533c812839385b7fca23 to 2b577d7d8cff27cd592dbbd9f21eba6951fdd33f to fix one clause of the commit message, which said that permissions_known tells a caller which of the two cases a blob is in. No such attribute exists anywhere in cle: the change adds PermissionedSegment and an optional permissions argument to Blob, and the clause now says so. Nothing else moved — both commits name tree 067091c331e00a4d16e36bed7048fe64164bb6bd, git diff 907ee1ee8e9c 2b577d7d8cff is empty, and the parent is 0e77ade3c39a3cee05f65051e57955675e1ac21b either way. The paragraphs above that name 907ee1ee say what was measured then and are left as they were.

CI status, head 2b577d7d8cff27cd592dbbd9f21eba6951fdd33f, read 2026-09-06 11:01Z. Run 34027806039: all 18 checks pass, as do the two commit statuses pre-commit.ci - pr and docs/readthedocs.org:cle.


Corpus attribution, 2026-08-28, keyed to head 8c4492f78e8b8486f1e5facc4ceed7aa28ee0893 against baseline 46a37333f4f59b0facf8774ee743ebc4cc074e9b, with angr/angr#6864 applied. Objects come from material that is not public and are named by architecture, container and sha256 only.

A category sweep, deduplicated by object digest, scores 460,618 distinct objects and asks whether a recovered block starts outside every executable region the file itself declares. 17,441 objects carry at least one, 1,918,593 blocks in total. ELF core dumps are 4,971 of those objects and 324,017 of the blocks, and the rate is the point: 97.8% of the 5,081 core dumps the sweep scored for placement carry the finding, 4,971 of 5,081. A rate that high is a property of how the format is loaded, not of individual objects.

The mechanism, confirmed against the cores' own program header tables read out of the files rather than through CLE: ELFCore turns every PT_LOAD it cannot match to a child into a Blob and then sets has_memory = False on itself, so the whole address space is served by those blobs. Blob builds a plain Segment whose base Region answers True to every permission query, and CFGBase._executable_memory_regions (angr/analyses/cfg/cfg_base.py:871 at angr 4f6489858) then treats the whole blob as executable, so the traced process's heap, stack, .data and ---p guard pages enter the scan set. Over seven cores, one per architecture plus the two largest, carrying 2,411 flagged blocks between them: 0 land in an r-x mapping, 1,076 in r-- and 1,335 in rw-.

Measured over 34 core dumps across five architectures, which reproduce the sweep's own block count and finding count exactly on 34 of 34:

flagged blocks cores at zero recovered blocks recovered functions
sweep revisions 5,445 0 of 34 30,757 1,232
cle and angr master 6,479 0 of 34 33,981 1,520
with this pair 0 34 of 34 27,829 662

The map is a stronger check than the count. With the pair applied, the executable memory angr scans over those 34 cores falls from 74,215,424 bytes to 3,031,040 — exactly the byte total of the cores' own r-x PT_LOADs, computed independently from the files. Nothing upstream has fixed this: at cle and angr master the same cores score 6,479, 19% worse than at the sweep's revisions, and not one core goes to zero.

The two changes are required together, and the figures above were measured with both. #758 supplies the permissions the core recorded; angr/angr#6864 makes the CFG read a blob's executable map from its segments instead of calling the whole blob executable. Neither alone moves this category, so attributing the result to either would overstate it.

What this category is once its Mach-O majority is set aside. 82.5% of its blocks and 70.0% of its objects are Mach-O — 1,582,505 of 1,918,593 blocks and 12,212 of 17,441 objects — and that share was already fixed before this analysis began, by cle f101f3c (#762, merged 2026-08-18) and not by anything in angr. MachOSection.is_executable used to return the parent segment's permission, and ld64 marks the whole of __TEXT r-x, so the backend-agnostic gate in CFGFast._generate_cfgnode — if not section.is_executable: return None — was inert on Mach-O and CFGFast decoded __cstring, __const and __unwind_info as code. No real recovery is lost to that fix: on the largest single object in the category, x86-64 Mach-O 9bd72c5857c7423e, 0 of the 2,331 functions master stops recovering lie inside the file's own declared instruction ranges, and over 66 non-fat Mach-O objects scored at both ends coverage of the function starts the files state rises, 38,855 to 38,941 of 48,060, falling on exactly one object by one function. The core dumps above are what the category is after that share is removed. It is context for the category, not a claim this change makes.


Where the growth over the sweep's revisions comes from, and that this pair absorbs it too. Added 2026-08-28, keyed to head 8c4492f78e8b8486f1e5facc4ceed7aa28ee0893 against baseline 46a37333f4f59b0facf8774ee743ebc4cc074e9b, measured with angr at 64d71a17afa62f6406b146724ed5c9503a045b7c (angr/angr#6864) and cle at 8c4492f78e8b8486f1e5facc4ceed7aa28ee0893 (#758), which are the current heads of both halves. Objects come from material that is not public and are named by architecture, container and sha256 prefix only.

The table above records current master at 6,479 flagged blocks against 5,445 at the sweep's revisions. A bisect over the 64 angr commits between those two, with cle, pyvex and archinfo held fixed at master so any delta is an angr delta and angr/rustylib rebuilt at every revision, names one first-bad commit: 40ef76021bef5fa2c47cd1a08dc10dac8ffeda48, "CFGFast: Make byte-skipping less aggressive in smart scan" (angr/angr#6894). It raised CFGFast's nodecode_window_size from 512 to 2048 and its nodecode_threshold from 0.3 to 0.6. Its parent aed504383 reproduces the sweep's figures exactly on every probe object and it reproduces master's exactly; nothing after it moves them. Those two constants are the linear scan's only escape from a region that is not code, and a core's data pages lift cleanly — 00 00 is a valid instruction on x86, ARM and MIPS — so the nodecode ratio never rises and the scan walks the whole mapping.

The added blocks are wrong rather than merely extra. Classifying each flagged block by the p_flags of the PT_LOAD the core file itself records: of the 982 blocks the commit adds on the x86 core, 254 land in r--, 728 in rw- and none in r-x; the 9 it adds on the mips core are all rw-.

Both heads above contain 40ef76021, so the comparison below is against master with that growth present. The angr half sits on 4f6489858, seven commits behind the b0feae57a the master arm was measured at; no commit in that span touches angr/analyses/cfg/cfg_fast.py or cfg_base.py, and the bisect revisions either side of it, 594063f19 and b0feae57a, give identical figures on all three probes, so the base difference is not a confound. Every arm carries three of three target rows, checked before differencing.

ELF core dump blocks outside executable, master b0feae57a with the pair
mips32, 829491bf32aa3190 17 0
x86, 99701519c3f9eda9 2,599 0

Per object the map is the stronger check, as it is over the 34 cores above. With the pair applied, the executable memory angr scans on the x86 core narrows from 2,211,840 bytes to 1,994,752 — exactly the total of that core's own r-x PT_LOADs, computed from the file with pyelftools — and on the mips core from 208,896 to 8,192, likewise exact. Recovered blocks and functions on the x86 core go from 13,894 and 474 to 11,294 and 166; what leaves is the flagged population.

So the elfcore side of this category is fully absorbed, increment included, and reverting 40ef76021 is not needed to reach zero here.

@angr-bot

Copy link
Copy Markdown
Member

Corpus decompilation diffs can be found at angr/dec-snapshots@master...angr/cle_758

@zardus

zardus commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS

The permissions of every blob segment cut out of the core dump, beside the permissions the core's own program header states for the mapping it came from.

the reproducer
import logging, os
logging.getLogger("cle").setLevel(logging.CRITICAL)
import cle

BIN = os.environ["BINARIES"]   # a checkout of angr/binaries
T = lambda *p: os.path.join(BIN, "tests", *p)

core = T("x86_64", "coredump", "true-libc.so.6-ld-linux-x86-64.so.2.core")
ld = cle.Loader(core, main_opts={"backend": "elfcore",
                                 "remote_file_mapper": lambda x: x.replace(
                                     "/tmp/foobar/does-not-exist", T("x86_64"))},
                auto_load_libs=True)
blobs = [o for o in ld.all_objects if isinstance(o, cle.Blob)]
print(f"{len(blobs)} mappings became blobs; blob segment perms vs the core's own program header")
print(f"{'segment':>22}  {'blob':>5}  {'core':>5}")
def p(r):
    return ("r" if r.is_readable else "-") + ("w" if r.is_writable else "-") + ("x" if r.is_executable else "-")
for blob in blobs:
    for seg in blob.segments:
        src = ld.elfcore_object.segments.find_region_containing(seg.vaddr)
        print(f"{seg.vaddr:#018x}  {p(seg):>5}  {p(src):>5}")

Before — every blob claims rwx, including the heap, the stack and the two rw- data mappings:

cle master at 46a37333f4f59b0facf8774ee743ebc4cc074e9b
5 mappings became blobs; blob segment perms vs the core's own program header
               segment   blob   core
0x000055555575b220    rwx    rw-
0x00007ffff7dd92c0    rwx    rw-
0x00007ffff7ffe1c8    rwx    rw-
0x00007ffffffde000    rwx    rw-
0xffffffffff600000    rwx    r-x

After — each blob states what the core recorded:

with this change, at 8c4492f78e8b8486f1e5facc4ceed7aa28ee0893
5 mappings became blobs; blob segment perms vs the core's own program header
               segment   blob   core
0x000055555575b220    rw-    rw-
0x00007ffff7dd92c0    rw-    rw-
0x00007ffff7ffe1c8    rw-    rw-
0x00007ffffffde000    rw-    rw-
0xffffffffff600000    r-x    r-x

@zardus

zardus commented Aug 29, 2026

Copy link
Copy Markdown
Member Author

THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS

How much of a corpus's analysis surface this cleans up, measured rather than
argued. This change does not make anything load that did not load before, so a
load-depth probe reports zero for it; what it changes is what CFGFast is told
to scan, and that is measurable.

Sample. 12,000 objects drawn uniformly at random, from a seeded permutation,
out of a 624,920-object internal corpus of compiler- and vendor-produced
binaries; 11,989 were retrievable and probed, 98 of them ELF core dumps.

Method. All 98 core dumps are loaded with the catalogue's declared recipe
and run through a complete CFGFast(normalize=True, resolve_indirect_jumps=True)
against master (eac0e5540516b9199dd6a91933e80dc774ea3eac) and against this
head (8c4492f78e8b8486f1e5facc4ceed7aa28ee0893) in one environment, so the two
arms are the same objects. 91 complete on both; 5 time out at 180 s, 1 raises
the same analysis error and 1 the same load error on both sides.

Result. On the 91 that complete, function count falls from 7,663 to 6,569
(−14.3%)
and CFG nodes from 90,091 to 84,824. It falls on 88 of the 91 objects
and rises on none. Total analysis time falls from 1,850 s to 963 s — the
same work in a little over half the wall clock.

Those are phantom functions, checked rather than assumed. Taking the dump
with the largest drop, a 32-bit ARM core: master reports 111 functions, this
head 41, and this head's set is a strict subset — it finds nothing new and
loses nothing the other found in real code.
On master every segment of the
child Blob the core is split into comes back r=w=x=True, so 1,114,112 bytes
are handed to the executable-region scan, including a 1 MiB read-write mapping
with no execute bit in the core's own program headers. On this head the same
dump offers 57,344 executable bytes. Of the 70 functions that disappear, 69
begin with all-zero bytes
— zero-fill decoded as movs r0, r0 — and the
seventieth is a four-byte fragment at the tail of the ARM kernel helper page.

One correction to our own notes. We had this change filed against the
NotImplementedError at region.py:is_executable that 95 Windows minidumps in
the same sample hit. It clears 0 of those 95: that assertion is in the Section
class, and this change touches Segment. Measured separately, and the control
set of 722 objects that already reached CFG on master is unchanged here — 0 of
722 differ.

The corpus is not redistributable, so its objects are described by architecture,
format and OS rather than named.

session: sharpen

@zardus
zardus force-pushed the feature/fix-cle-elfcore-blob-perms branch from 8c4492f to 907ee1e Compare September 6, 2026 07:18
A core dump records what every mapping of the crashed process was allowed to
do, and ELFCore reads that correctly: its own segments report r-x, rw- and ---
exactly as the program headers spell them.

The mappings it cannot match to a child object are then handed to Blob, and the
permissions do not go with them. Blob builds a plain Segment, whose base Region
answers True to every permission query, so the heap, the stack, the ELF header
page and the ---p guard pages all reach the loader as executable memory. The
pieces a mapping is cut into when a child object covers part of it lost the
permissions the same way, before they ever reached Blob.

Give Blob an optional permissions triple describing the memory it was taken
from, and pass the segment's own flags through from ELFCore. A blob loaded from
a raw image still reports everything permissive, because a raw image records
nothing to the contrary; with the triple, Blob builds a PermissionedSegment,
which answers from the flags instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@zardus
zardus force-pushed the feature/fix-cle-elfcore-blob-perms branch from 907ee1e to 2b577d7 Compare September 6, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ELFCore drops the permissions of every core segment it turns into a Blob

2 participants