llamafile icon indicating copy to clipboard operation
llamafile copied to clipboard

Vulnerable release version

Open d-z-m opened this issue 11 months ago • 1 comments

From commit 6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9 up until commit a4b07c057a553b1ac253051efc3f040351e2eae1, llama.cpp upstream was vulnerable to the heap based buffer overflow described here(cve link).

I realize this is fixed on main, but the most recent llamafile release is still vulnerable.

I propose cutting a new release that has this patched, so that newcomers to llamafile aren't downloading a version that is vulnerable to exploit.

d-z-m avatar Mar 18 '24 12:03 d-z-m

We anticipated things like this would happen. llamafile supports sandboxing when running in cpu mode on linux and openbsd. llamafile also recently started supporting sandboxing on macos. https://github.com/Mozilla-Ocho/llamafile?tab=readme-ov-file#security We'll be doing an upstream synchronization soon.

jart avatar Mar 19 '24 04:03 jart

I'm developing a game using llamafile, and on one tester's machine, the McAfee isolated the exe as a threat (of course making the game unusable). This might be related to this vulnerability, so a fix would be greatly appreciated.

upost avatar Mar 22 '24 07:03 upost

@upost Windows Defender is the only virus scanner we support. It should never flag the release binaries on our GitHub releases page. If it does, then you should file an issue so I can fix it. Others like McAfee, I can't help you.

jart avatar Mar 22 '24 09:03 jart

Just wanted to clarify...you already had the fix on main(although I appreciate the update nonetheless, as I think it contains support for IQ quants). I was suggesting cutting a new release that has the fix compiled in, as the current release version was built off of a llama.cpp upstream that was vulnerable.

d-z-m avatar Mar 23 '24 15:03 d-z-m

We have a new llamafile 0.7 release out which includes a sync incorporating the upstream fix. Therefore I believe this issue should be settled. Thank you for bringing the CVE to my attention. Enjoy using llamafile!

jart avatar Mar 31 '24 04:03 jart