SPB Git

Repository Public

QYV-AUD-008.json 2.8 KB 28 lines json

1{2 "id": "QYV-AUD-008",3 "title": "The memory probe of the benchmarks could report a high-water mark below the current resident size",4 "severity": "info",5 "cvss_vector": "",6 "cvss_score": null,7 "cwe": "CWE-362",8 "masvs": "",9 "area": "tests",10 "location": "Sources/QyvoraBenchmarks/SystemProbe.swift:213",11 "tool": "engine-tests",12 "rule": "",13 "status": "fixed",14 "fix_commit": "6bc8b67",15 "regression_test": "QyvoraBenchmarksTests.ProbeTests.thePeakNeverTrailsTheCurrentSizeWhileTheProcessGrows and probesReturnPlausibleValues.",16 "description": "Root cause: `ProbeTests.probesReturnPlausibleValues` failed once in three runs on `memory.peak >= memory.current`. The probe returned the two figures of `task_info(MACH_TASK_BASIC_INFO)` as they are. They are two counters, not a consistent pair: the resident size is computed when the call is made, the kernel's high-water mark is kept separately and can trail it while other threads of the process fault pages in. Measured on the laptop (macOS 27, Apple silicon) with four tasks growing the process: the kernel's mark was below the size read in the same call in about 0.07 % of 250 000 samples, by up to three pages (49 152 bytes). No security impact; a benchmark report could show a negative or understated peak increase.",17 "recommendation": "Report a real high-water mark, and test the probe under concurrent growth.",18 "evidence": "",19 "fingerprint": "8aa8448751d2",20 "reported": "2026-12-05",21 "owner": "integrator",22 "fixed": "2026-12-05",23 "verification": "Package tests of the whole root package on M5M36 (Swift 6.4, release, 895 tests in 23 runs, no failure) at commit f0ddca7; QyvoraWalletTests (212 tests) run five consecutive times on the laptop without failure after the last source change; application target compiled for iphoneos on M3U96a and for the simulator on the laptop; changed screens read on the simulator \"Qyvora iPhone B\" where the review record security/audit/review/multichain-app-screens.json says so; static checks and framework steps of the audit re-run. The final laptop run of the whole package and the quick audit were made after this register was written: their results are in the report of the work, not here.",24 "found_by": "review of App/Sources for the new chains (2026-12-05)",25 "resolution_note": "`residentMemory()` returns the largest of the kernel's mark and of every resident size the probe has read in the process, so `peak >= current` holds for every answer and the peak never decreases; `rawResidentMemory()` exposes the kernel's pair. The new test samples the probe for 0.6 s under growth and prints how often the raw pair was inverted.",26 "residual_risk": "A size reached between two calls of the probe that the kernel's mark also missed is not seen: the figure remains approximate, as the benchmark report says."27}28
Files main
Menu

Theme