Title: Use after free in Macro::expand() for data freed in Macro::expandHashHash() · Issue #60 · cppcheck-opensource/simplecpp · GitHub
Open Graph Title: Use after free in Macro::expand() for data freed in Macro::expandHashHash() · Issue #60 · cppcheck-opensource/simplecpp
X Title: Use after free in Macro::expand() for data freed in Macro::expandHashHash() · Issue #60 · cppcheck-opensource/simplecpp
Description: Following code leads into heap-use-after-free error in Macro::expand() function: #define hash_hash # # # #define join inc hash_hash join This results in following (partial) AddressSanitizer stack backtrace: ==29361==ERROR: AddressSanitiz...
Open Graph Description: Following code leads into heap-use-after-free error in Macro::expand() function: #define hash_hash # # # #define join inc hash_hash join This results in following (partial) AddressSanitizer stack b...
X Description: Following code leads into heap-use-after-free error in Macro::expand() function: #define hash_hash # # # #define join inc hash_hash join This results in following (partial) AddressSanitizer stack b...
Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/issues/60
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Use after free in Macro::expand() for data freed in Macro::expandHashHash()","articleBody":"Following code leads into heap-use-after-free error in Macro::expand() function:\r\n\r\n```\r\n#define hash_hash # # #\r\n#define join inc hash_hash\r\njoin\r\n```\r\n\r\nThis results in following (partial) AddressSanitizer stack backtrace:\r\n\r\n```\r\n==29361==ERROR: AddressSanitizer: heap-use-after-free ...\r\nREAD of size 8 at 0x60b000009b38 thread T0\r\n #0 0x52c7d4 in simplecpp::Macro::expand(...) const simplecpp.cpp:1329:60\r\n...\r\nfreed by thread T0 here:\r\n #0 0x4fde00 in operator delete(void*) llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:110\r\n #1 0x52efd7 in simplecpp::Macro::expandHashHash(...) const simplecpp.cpp:1527:13\r\n #2 0x52c17b in simplecpp::Macro::expand(...) const simplecpp.cpp:1321:23\r\n...\r\n```\r\n\r\nThis can be detected by AddressSanitizer and Valgrind (with --track-origins=yes command line switch). Attached the full backtraces from AddressSanitizer and Valgrind runs:\r\n\r\n[use-after-free-macro-expand-expandhashhash-asan.txt](https://github.com/danmar/simplecpp/files/580945/use-after-free-macro-expand-expandhashhash-asan.txt)\r\n[use-after-free-macro-expand-expandhashhash-valgrind.txt](https://github.com/danmar/simplecpp/files/580946/use-after-free-macro-expand-expandhashhash-valgrind.txt)\r\n\r\nThis happens with simplecpp revision d1c995c03515d289c7aa7246a74d666fd012c4eb","author":{"url":"https://github.com/Barro","@type":"Person","name":"Barro"},"datePublished":"2016-11-09T14:33:52Z","url":"https://github.com/cppcheck-opensource/simplecpp/issues/60"}
| 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:a1eff8f3-d94b-de49-fc11-ccd80a0a9696 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CBE4:1517F0:207487:2DADFC:6AFC5C3E |
| html-safe-nonce | 0e14d636d5bb11634456fafc21624383f116b671e32731c9f40f48eabf50882e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQkU0OjE1MTdGMDoyMDc0ODc6MkRBREZDOjZBRkM1QzNFIiwidmlzaXRvcl9pZCI6IjEwODc0MDI5ODI4OTIxMzM0MzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0b0ae8f664468a7ca472787d34d90e75c2434c5e164d2c78c6ab75eda75137ff |
| hovercard-subject-tag | issue:188261501 |
| github-keyboard-shortcuts | repository,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/cppcheck-opensource/simplecpp/60/issue_layout |
| twitter:image | https://opengraph.githubassets.com/867cd6506cec30085402248cd76a6e159900c3367d859f596463b35f5b04f39c/cppcheck-opensource/simplecpp/issues/60 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/867cd6506cec30085402248cd76a6e159900c3367d859f596463b35f5b04f39c/cppcheck-opensource/simplecpp/issues/60 |
| og:image:alt | Following code leads into heap-use-after-free error in Macro::expand() function: #define hash_hash # # # #define join inc hash_hash join This results in following (partial) AddressSanitizer stack b... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Barro |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4f3b2b289515382e47edd25c65b136bf38bf579bf087f67ba6bcdcef5db540ad |
| turbo-cache-control | no-preview |
| go-import | github.com/cppcheck-opensource/simplecpp git https://github.com/cppcheck-opensource/simplecpp.git |
| octolytics-dimension-user_id | 278097703 |
| octolytics-dimension-user_login | cppcheck-opensource |
| octolytics-dimension-repository_id | 33434464 |
| octolytics-dimension-repository_nwo | cppcheck-opensource/simplecpp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33434464 |
| octolytics-dimension-repository_network_root_nwo | cppcheck-opensource/simplecpp |
| 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 | c0012cfe4370eb5aa24887f80677be13de4df94d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width