Skip to content

VSCode for Linux utilizes an executable stack #49793

@b1ack0wl

Description

@b1ack0wl
  • VSCode Version: 1.23.1
  • OS Version: Ubuntu 18.04 || Fedora 28 Workstation

Steps to Reproduce: Create a Linux based VM. It can either be Debian based or Fedora

  1. Download VSCode for Linux (deb || rpm)
  2. Launch VSCode
  3. Open a Terminal and check the stack permissions for each VSCode process.
    3a. Command: for i in $(pidof code); do cat /proc/$i/maps | grep stack; done
  4. Command from 3a should show that each process has an executable stack. Replacing the word "stack" with "rwxp" will show all of the Read,Write,eXecute mappings VScode has performed. There are > 100 RXW pages which is odd for modern desktop application.

VSCode running with Executable Stacks

[a@localhost ~]$ for i in $(pidof code); do cat /proc/$i/maps | grep stack; done
7ffd94abc000-7ffd94ade000 rwxp 00000000 00:00 0                          [stack]
7ffcff029000-7ffcff04b000 rwxp 00000000 00:00 0                          [stack]
7ffcff029000-7ffcff04b000 rwxp 00000000 00:00 0                          [stack]
7ffda0307000-7ffda0329000 rwxp 00000000 00:00 0                          [stack]
7ffcff029000-7ffcff04b000 rwxp 00000000 00:00 0                          [stack]
7fffdbd34000-7fffdbd56000 rwxp 00000000 00:00 0                          [stack]

Rough estimate of how many RWX allocations there are within each VSCode process.

[a@localhost ~]$ for i in `pidof code`; do cat /proc/$i/maps | grep rwxp| wc -l; done
197
264
418
154
120
247

Does this issue occur when all extensions are disabled?: Yes

Metadata

Metadata

Assignees

Labels

*duplicateIssue identified as a duplicate of another issue(s)electronIssues and items related to ElectronlinuxIssues with VS Code on Linux

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions