Title: PPM decoder accepts truncated pixel data and violates the core Image invariant · Issue #563 · treeform/pixie · GitHub
Open Graph Title: PPM decoder accepts truncated pixel data and violates the core Image invariant · Issue #563 · treeform/pixie
X Title: PPM decoder accepts truncated pixel data and violates the core Image invariant · Issue #563 · treeform/pixie
Description: A malformed PPM can declare large width and height but provide too little pixel data. The decoder replaces result.data with a shorter sequence without checking that data.len == width * height, producing an inconsistent Image and creating...
Open Graph Description: A malformed PPM can declare large width and height but provide too little pixel data. The decoder replaces result.data with a shorter sequence without checking that data.len == width * height, prod...
X Description: A malformed PPM can declare large width and height but provide too little pixel data. The decoder replaces result.data with a shorter sequence without checking that data.len == width * height, prod...
Opengraph URL: https://github.com/treeform/pixie/issues/563
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PPM decoder accepts truncated pixel data and violates the core Image invariant","articleBody":"A malformed PPM can declare large width and height but provide too little pixel data. The decoder replaces result.data with a shorter sequence without checking that `data.len == width * height`, producing an inconsistent Image and creating downstream memory-safety risk in release builds.\n\n```nim\n# Run: nim r --path:src pocs/ppm_truncated_invariant_break.nim\nimport pixie\n\nlet payload = \"P6\\n10 10\\n255\\n\" & \"\\x12\\x34\\x56\"\nlet image = decodeImage(payload)\n\necho \"decoded width: \", image.width\necho \"decoded height: \", image.height\necho \"decoded pixels: \", image.data.len\necho \"expected pixels: \", image.width * image.height\n\nif image.data.len == image.width * image.height:\n quit(\"PoC did not reproduce the invariant break\", 1)\n```","author":{"url":"https://github.com/hourianto","@type":"Person","name":"hourianto"},"datePublished":"2026-03-10T14:06:17Z","url":"https://github.com/treeform/pixie/issues/563"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6a96fc57-edf1-e63c-0347-6b34772732c7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D50A:361F5C:64524:8921A:6B04AADB |
| html-safe-nonce | 85189afd0831e83d92da5c2ac89875174890a01dab460bbb43f82e5476d9d49f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTBBOjM2MUY1Qzo2NDUyNDo4OTIxQTo2QjA0QUFEQiIsInZpc2l0b3JfaWQiOiI4OTY2MTYzODExODQ1NTgxNTMxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c196d4ffd37c875739b2f6b17c47bbc5db78146fcd0c3d343f00929934d7d00a |
| hovercard-subject-tag | issue:4052050830 |
| github-keyboard-shortcuts | repository,source-code,file-tree,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/treeform/pixie/563/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9d3f2758fa58364bb47216815744adb13753c4413e283b7bb8f94ca86a5e2085/treeform/pixie/issues/563 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9d3f2758fa58364bb47216815744adb13753c4413e283b7bb8f94ca86a5e2085/treeform/pixie/issues/563 |
| og:image:alt | A malformed PPM can declare large width and height but provide too little pixel data. The decoder replaces result.data with a shorter sequence without checking that data.len == width * height, prod... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hourianto |
| hostname | github.com |
| expected-hostname | github.com |
| None | f1d110ea058a0915c1d8aa3fc2069fa15801e128f591e5762525abe77490ecb1 |
| turbo-cache-control | no-preview |
| go-import | github.com/treeform/pixie git https://github.com/treeform/pixie.git |
| octolytics-dimension-user_id | 125948 |
| octolytics-dimension-user_login | treeform |
| octolytics-dimension-repository_id | 314427501 |
| octolytics-dimension-repository_nwo | treeform/pixie |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 314427501 |
| octolytics-dimension-repository_network_root_nwo | treeform/pixie |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ffa22a65e4c46d376940fe34b05e6a7e9c7fdb9b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width