WSL kernel 6.6 disables `CONFIG_MODIFY_LDT_SYSCALL`
Windows Version
Microsoft Windows [Version 10.0.26100.4061]
WSL Version
2.5.7.0
Are you using WSL 1 or WSL 2?
- [x] WSL 2
- [ ] WSL 1
Kernel Version
6.6.87.1-1
Distro Version
Ubuntu 24.04
Other Software
wibo, version 0.6.16
Repro Steps
- Update to WSL 2.5.7.0
- Run wibo
Expected Behavior
- wibo should run wrapped executable
Actual Behavior
- wibo exits with error
This was working previously with kernel 5.5, and also works when custom compiling 6.x kernel with CONFIG_MODIFY_LDT_SYSCALL re-enabled (was disabled in this commit)
With that said, this is a breaking change between kernel versions that was unexpected and not trivial to diagnose. Additionally resolving it requires custom compiling either a 5.x kernel which works by default, or a 6.x kernel with this flag enabled (since MS does not appear to have pre-built kernel bzImages available for older versions as far as I could tell)
Diagnostic Logs
Logs are required for review from WSL team
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
How to collect WSL logs
Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1
The script will output the path of the log file once done.
If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here
Once completed please upload the output files to this Github issue.
Click here for more info on logging If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.
Diagnostic information
Issue was edited and new log file was found: https://github.com/user-attachments/files/20481117/WslLogs-2025-05-28_20-38-42.zip
.wslconfig found
Detected appx version: 2.5.7.0
@chessturo - looks like CONFIG_MODIFY_LDT_SYSCALL was dropped from the 6.6 kernel.
FWIW, this also impacts https://github.com/evmar/retrowin32
$ zgrep MODIFY_LDT /proc/config.gz
# CONFIG_MODIFY_LDT_SYSCALL is not set
$ ...retrowin32 run
thread 'main' panicked at win32/src/ldt.rs:68:17:
syscall(SYS_modify_ldt): Function not implemented (os error 38)
We're planning to fix this issue in the next kernel release. In the meantime, you can build a custom kernel with the config enabled as a workaround.