Open practicalswift opened 8 years ago
This issue has been fixed in my kilo
fork called openemacs
: https://github.com/practicalswift/openemacs :-)
Well then you could try sending a pull request upstream we all will get it aswell in the process.
@pankajdoharey I think @antirez' intention is to let any further development be done by others in their respective forks, so submitted pull requests have not being merged into this repo historically. So I'm afraid a PR is unlikely to be merged.
Luckily the fix is trivial, just check so that strlen(p) >= klen
prior to doing the memcmp
:-)
@practicalswift WoW. Well in that case may be he should handover the maintenance to someone able in the community.
@antirez What's the sitrep on this repo? Are you going to be maintaining it?
Safe to say this is unmaintained? @antirez
Hi,
Kilo appears to have a heap buffer overflow triggered by the
memcmp
call on line 475 of kilo.c:The signature of
memcmp
:memcmp
operates under the assumption thats1
ands2
are at leastn
bytes long each.This assumption clearly holds for the second argument (
keywords[j]
), but there are no checks in place that makes sure that this assumption holds also for the first argument (p
).The heap overflow can be verified by compiling
kilo
with ASAN enabled: