Title: Stack overflow when using Get-ChildItem on registry provider · Issue #10215 · PowerShell/PowerShell · GitHub
Open Graph Title: Stack overflow when using Get-ChildItem on registry provider · Issue #10215 · PowerShell/PowerShell
X Title: Stack overflow when using Get-ChildItem on registry provider · Issue #10215 · PowerShell/PowerShell
Description: Steps to reproduce Open PowerShell console with Administrator right, and type in the following commands. The search item (here Installer) is irrelevant, also reproducible with wildcards. cd HKLM: dir -Recurse -Name -ErrorAction SilentlyC...
Open Graph Description: Steps to reproduce Open PowerShell console with Administrator right, and type in the following commands. The search item (here Installer) is irrelevant, also reproducible with wildcards. cd HKLM: d...
X Description: Steps to reproduce Open PowerShell console with Administrator right, and type in the following commands. The search item (here Installer) is irrelevant, also reproducible with wildcards. cd HKLM: d...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/10215
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Stack overflow when using Get-ChildItem on registry provider","articleBody":"\u003c!--\r\n\r\nFor Windows PowerShell 5.1 issues, suggestions, or feature requests please use the following link instead:\r\nWindows PowerShell [UserVoice](https://windowsserver.uservoice.com/forums/301869-powershell)\r\n\r\nThis repository is **ONLY** for PowerShell Core 6 issues.\r\n\r\n- Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- Search the existing issues.\r\n- Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- Refer to the [known issues](https://docs.microsoft.com/powershell/scripting/whats-new/known-issues-ps6?view=powershell-6).\r\n\r\n-->\r\n\r\n# Steps to reproduce\r\nOpen PowerShell console with Administrator right, and type in the following commands.\r\nThe search item (here Installer) is irrelevant, also reproducible with wildcards.\r\n```powershell\r\ncd HKLM:\r\ndir -Recurse -Name -ErrorAction SilentlyContinue -Include Installer\r\n```\r\n# Expected behavior\r\nGet-ChildItem returns found registry subkeys.\r\n\r\n# Actual behavior\r\nPowerShell crashes with StackOverflowException.\r\n\r\n\r\n\r\n# Environment data\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```none\r\nPS > $PSVersionTable\r\n\r\nName Value\r\n---- -----\r\nPSVersion 6.2.2\r\nPSEdition Core\r\nGitCommitId 6.2.2\r\nOS Microsoft Windows 10.0.17134\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n# Notes\r\nAfter further investigation I've come to the conclusion that the cause is a registry entry that has `/` as its name.\r\n```none\r\nHKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\PnpResources\\Registry\\HKLM\\System\\CurrentControlSet\\Services\\usbhub\\/\r\n```\r\nThis causes Get-ChildItem to recurse back to the root item endlessly and finally triggers stack overflow.\r\n\r\nNot reproducible with non-administrative user rights due to the registry key's access permission disallows reading its child items.\r\n\r\nAlso reproducible with PS 5.1.","author":{"url":"https://github.com/satorp","@type":"Person","name":"satorp"},"datePublished":"2019-07-23T21:42:34Z","url":"https://github.com/PowerShell/PowerShell/issues/10215"}
| 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:0c31c1ae-bad1-9e16-c976-f50301ea48fb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 908A:9FF1A:2D85350:3FBD00C:6AFD6BFA |
| html-safe-nonce | 0df3655b87b61d2f5aa50258cff698f08ab781bebce814382087ef5f23991d54 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDhBOjlGRjFBOjJEODUzNTA6M0ZCRDAwQzo2QUZENkJGQSIsInZpc2l0b3JfaWQiOiIyNDUyNjk3NDg2Mjc2MjU4ODEwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9915e054753d705fed7c050341e313b6b45872ceb4f319afdc11513867f08132 |
| hovercard-subject-tag | issue:471969889 |
| 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/PowerShell/PowerShell/10215/issue_layout |
| twitter:image | https://opengraph.githubassets.com/543759bad33371d807dd9f2a74782fcfe5a300e122af478918bd66cde7538c2e/PowerShell/PowerShell/issues/10215 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/543759bad33371d807dd9f2a74782fcfe5a300e122af478918bd66cde7538c2e/PowerShell/PowerShell/issues/10215 |
| og:image:alt | Steps to reproduce Open PowerShell console with Administrator right, and type in the following commands. The search item (here Installer) is irrelevant, also reproducible with wildcards. cd HKLM: d... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | satorp |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9985ca2e21b59673104d4d830d4afeb946c67f248f273ab2e824c31c8db46e4a |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| 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 | 0db9e8d463c3f4540570e6ad3c501a06db9dc02a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width