Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QVM out-of-bounds memory access #358

Open
zturtleman opened this issue Apr 4, 2018 · 3 comments · May be fixed by #524
Open

QVM out-of-bounds memory access #358

zturtleman opened this issue Apr 4, 2018 · 3 comments · May be fixed by #524

Comments

@zturtleman
Copy link
Member

zturtleman commented Apr 4, 2018

The system call handlers don't validate the memory addresses / lengths passed to for memset, memcpy, and many other system calls. Reported by @mickael9 and also recently fixed in a quake3e commit.

@ec-
Copy link

ec- commented Apr 9, 2018

@aufau
Copy link

aufau commented May 2, 2018

For reference, this is how I implemented the same idea in JK2MV:

https://github.com/mvdevs/jk2mv/blob/master/src/qcommon/qcommon.h#L359-L372
https://github.com/mvdevs/jk2mv/blob/master/src/qcommon/vm.cpp#L850-L991
https://github.com/mvdevs/jk2mv/blob/master/src/server/sv_game.cpp#L343-L1088

Probably not all of these helper functions would be needed in ioq3. On first sight the main difference seems to be that it also sanitizes reads.

I can port it to ioq3 if you're interested, but it would be nice to get an extra review before doing so (it has been out in jk2mv since June last year and no reports so far).

@zturtleman
Copy link
Member Author

This is being worked on in #441.

@elasota elasota linked a pull request Oct 8, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants