CARVIEW |
Select Language
HTTP/2 200
date: Fri, 25 Jul 2025 21:55:14 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/ksh93/ksh.git
etag: W/"1d658dc90028c82418e88306c738abbc"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=a7QIdzLomOIzPT2LU3zo7FDuqpC3UQnEIl0D0dKuWf6lUV17Lrg30FzRw%2FcdtgjuqsSAhQJjs6YiK8TUE83OFMYOt5XK8vSQDvrioG8qejwl0HlHwHUn08sHP7o531POIGypd0te0M1Y%2BHXhwQ0xq8LT%2BnWJw0mEP9NCcmrFAiolObp0eYJbijKnWoBBOIFsHWg%2Fsf2prQMrCQgfLwSdT%2BCOVk%2Be4XdKgCh32QYdIXu5i35Pkjku09PNyrX%2FdzZYjhMAoY3NTwdrcOFlKNIeLg%3D%3D--JmC6hR4auMNl0hlz--Tdo6KyWP8OQtlkhRocyePw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1276740930.1753480513; Path=/; Domain=github.com; Expires=Sat, 25 Jul 2026 21:55:13 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sat, 25 Jul 2026 21:55:13 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: B224:123CFB:FC85F:16093E:6883FD41
Fix subshell leak for 3 special variables (re: 417883df, bd3e2a80) · ksh93/ksh@e1c41bb · GitHub
Copy file name to clipboardExpand all lines: src/cmd/ksh93/bltins/typeset.c
Copy file name to clipboardExpand all lines: src/cmd/ksh93/sh/subshell.c
Copy file name to clipboardExpand all lines: src/cmd/ksh93/tests/variables.sh
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit e1c41bb
committed
Using a process of elimination I've identified ${.sh.level}
(SH_LEVELNOD) as the cause of the crash. This node apparently
cannot be copied or moved without destabilising the shell. It
contains the current depth of function calls and it cannot be
changed by assignment, so this is not actually a problem.
Meanwhile, this commit re-fixes it for the other three.
src/cmd/ksh93/sh/subshell.c:
- Simplify sh_assignok() by removing special-casing for L_ARGNOD,
SH_SUBSCRNOD and SH_NAMENOD. 'add' now has 3 modes (0, 1, 2).
- The test for a ${ subshare; } was actually wrong. sp->subshare is
a saved backup value. We must test shp->subshare. (re: a9de50b)
src/cmd/ksh93/bltins/typeset.c:
- setall(): Update the mode 3 sh_assignok() call.
src/cmd/ksh93/tests/variables.sh:
- Regress-test subshell leaks for all special variables except
${.sh.level}.
1 parent 417883d commit e1c41bbCopy full SHA for e1c41bb
File tree
Expand file treeCollapse file tree
3 files changed
+23
-8
lines changedFilter options
- src/cmd/ksh93
- bltins
- sh
- tests
Expand file treeCollapse file tree
3 files changed
+23
-8
lines changedsrc/cmd/ksh93/bltins/typeset.c
Copy file name to clipboardExpand all lines: src/cmd/ksh93/bltins/typeset.c+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
800 | 800 |
| |
801 | 801 |
| |
802 | 802 |
| |
803 |
| - | |
| 803 | + | |
804 | 804 |
| |
805 | 805 |
| |
806 | 806 |
| |
|
src/cmd/ksh93/sh/subshell.c
Copy file name to clipboardExpand all lines: src/cmd/ksh93/sh/subshell.c+5-7Lines changed: 5 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
235 | 235 |
| |
236 | 236 |
| |
237 | 237 |
| |
238 |
| - | |
239 |
| - | |
240 | 238 |
| |
241 | 239 |
| |
242 | 240 |
| |
| |||
248 | 246 |
| |
249 | 247 |
| |
250 | 248 |
| |
251 |
| - | |
252 |
| - | |
253 |
| - | |
254 |
| - | |
255 |
| - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
256 | 254 |
| |
257 | 255 |
| |
258 | 256 |
| |
|
src/cmd/ksh93/tests/variables.sh
Copy file name to clipboardExpand all lines: src/cmd/ksh93/tests/variables.sh+17Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1011 | 1011 |
| |
1012 | 1012 |
| |
1013 | 1013 |
| |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
1014 | 1031 |
| |
1015 | 1032 |
| |
1016 | 1033 |
| |
|
You can’t perform that action at this time.
0 commit comments