Title: src: fix crash when reading length on Storage.prototype by 3zrv · Pull Request #63529 · nodejs/node · GitHub
Open Graph Title: src: fix crash when reading length on Storage.prototype by 3zrv · Pull Request #63529 · nodejs/node
X Title: src: fix crash when reading length on Storage.prototype by 3zrv · Pull Request #63529 · nodejs/node
Description: Fixes: #63514
The following one-liner reliably segfaults:
$ node -e 'globalThis.sessionStorage.setItem.length;globalThis.Storage.prototype.length'
[1] 42883 segmentation fault (core dumped)
Stack trace:
#0 sqlite3LockAndPrepare ()
#1 sqlite3_prepare_v2 ()
#2 node::webstorage::Storage::Length ()
#3 node::webstorage::StorageLengthGetter ()
Root cause
Storage's length accessor is defined on the prototype template:
Local
Open Graph Description: Fixes: #63514 The following one-liner reliably segfaults: $ node -e 'globalThis.sessionStorage.setItem.length;globalThis.Storage.prototype.length' [1] 42883 segmentation fault (core dump...
X Description: Fixes: #63514 The following one-liner reliably segfaults: $ node -e 'globalThis.sessionStorage.setItem.length;globalThis.Storage.prototype.length' [1] 42883 segmentation fault (c...
Opengraph URL: https://github.com/nodejs/node/pull/63529
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a956aa7d-cb20-ca84-d20c-b7151043cd2b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8196:17F796:29289EE:3A31F85:6A4CEFA1 |
| html-safe-nonce | 3e9b18dd9270daf89a265e72715d20ca903f67b3092ba055f97cfbe71e1393c6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTk2OjE3Rjc5NjoyOTI4OUVFOjNBMzFGODU6NkE0Q0VGQTEiLCJ2aXNpdG9yX2lkIjoiMzkyMTg2MTQ4NjE5NjEyMDY1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0f23a78b015cbaa6a5d8f212e7959a151618e99068045d353df0ec20aeba9185 |
| hovercard-subject-tag | pull_request:3736912294 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/nodejs/node/pull/63529/files |
| twitter:image | https://avatars.githubusercontent.com/u/73386311?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/73386311?s=400&v=4 |
| og:image:alt | Fixes: #63514 The following one-liner reliably segfaults: $ node -e 'globalThis.sessionStorage.setItem.length;globalThis.Storage.prototype.length' [1] 42883 segmentation fault (core dump... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | efec6750a5afcaeaf5dfcf629f404cf98c8371e3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width