Commit graph

147 commits

Author SHA1 Message Date
Török Edvin
50829fbf12 Fix read of pedata in interpreter. 2010-03-24 10:41:11 +02:00
Török Edvin
0dd40a5490 Fix OP_BC_COPY. 2010-03-24 10:16:41 +02:00
Török Edvin
1c7c61941c Fix GEPZ. 2010-03-24 00:07:17 +02:00
Török Edvin
4993d6cf02 Making progress on match_with_read. 2010-03-23 23:46:58 +02:00
Török Edvin
74f5816c58 Interpreter fixes for accessing 'ctx'.
This allow all cbcs in unit_tests/input to pass.
Not yet working on bytecode.cvd though.
2010-03-23 21:47:57 +02:00
Török Edvin
bdd9aeaeeb Use a watchdog thread. Also make timeout be ms instead of us. 2010-03-23 16:33:41 +02:00
Török Edvin
92a08a03bf --enable-unsigned-bytecode.
Use this instead of --enable-debug to enable load of unsigned bytecode.
2010-03-22 17:29:26 +02:00
Török Edvin
b63681a52b Introduce BytecodeTimeout. 2010-03-22 17:16:07 +02:00
Török Edvin
9aa1d72591 Fix distcheck errors. 2010-03-22 13:00:23 +02:00
Török Edvin
c6c464e590 Fix clambc. 2010-03-22 12:53:48 +02:00
Török Edvin
52d0d8bc7e More fixes for global vars in the interpreter. 2010-03-22 11:18:28 +02:00
Török Edvin
9cbece5ccd WiP fixing globals in interpreter. 2010-03-22 11:18:28 +02:00
Török Edvin
f6471bc9d6 More APIs. 2010-03-22 11:18:28 +02:00
Török Edvin
d9fbce26fc More API additions for PDF. 2010-03-22 11:18:28 +02:00
Török Edvin
606fd6d0f1 Allow "None" bytecode security setting only in --enable-debug mode. 2010-03-10 14:30:31 +02:00
Török Edvin
db29675436 Fix build. 2010-03-06 22:36:16 +02:00
Török Edvin
20327f931f compute global offsets. 2010-03-06 16:28:08 +02:00
Török Edvin
bc157ce357 prepare for reading globals from ctx 2010-03-06 16:00:54 +02:00
Török Edvin
c074ececc7 Properly calculate numBytes for interpreter, and protect interpreter from null
derefs.
2010-02-22 14:12:55 +02:00
Török Edvin
f451cc9ac0 fix loading of bytecode into intepreter. 2010-02-15 17:32:41 +02:00
Török Edvin
3ff41e32b1 fix globals in interpreter. 2010-02-15 17:32:41 +02:00
Török Edvin
6eeadbfeda dconf for bytecode. 2010-02-15 17:32:41 +02:00
Török Edvin
039af772c8 Don't fail if bytecode was skipped due to functionality level. 2010-02-15 17:32:41 +02:00
Török Edvin
236fb13647 New pointer handling rules. 2010-02-15 17:32:40 +02:00
Török Edvin
9bdaf35dea print bytecode source code. 2010-02-08 15:16:33 +02:00
Török Edvin
57f14280a7 Fix use-after-free on bytecode load/execution.
lsig->bc was referring to the bytecode directly (via a pointer),
but the bytecode struct changes place in memory (it is realloced on each .cbc
load). So use an index instead of the direct pointer.
2010-02-02 15:30:20 +02:00
Török Edvin
847d7fc1b8 2009->2010 2010-02-02 14:03:32 +02:00
Török Edvin
c1aff5ec76 fix loading from .cvd.
Chomp first line too, and look for \0 instead of \n.
2010-02-02 13:46:37 +02:00
Török Edvin
f6e8bb802a fix segfault on failed cbc load.
The bytecode struct might be only partially initialized. Account for that.
2010-02-02 13:42:33 +02:00
Tomasz Kojm
baf2e702e2 libclamav: provide information about lsig matches to bytecode (bb#1799) 2010-01-28 12:54:28 +01:00
Török Edvin
c0afc51729 Don't use C++ comments in C code. 2010-01-27 12:07:08 +02:00
Török Edvin
5297d09e9f fix distcheck warning. 2010-01-25 15:15:54 +02:00
Török Edvin
1a1876ceeb typo. 2010-01-22 17:19:11 +02:00
Török Edvin
a35cfe5137 print bytecode metadata. 2010-01-22 16:50:35 +02:00
Török Edvin
be43f951c6 BytecodeSecurity setting. 2010-01-22 16:50:35 +02:00
Török Edvin
2d45ef0616 Support for malloc in bytecode. Fix crash with mismatched api/flevel versions. 2010-01-20 20:04:01 +02:00
Török Edvin
b31f2e7a2d Fix loading of apicall8 (disasm).
must alloc room for numop+2,
must validate only first element of an array type (it doesn't have more!),
regenerate _api_decl.c using ifacegen.
2010-01-19 19:58:15 +02:00
Török Edvin
f4e3421592 Support PE hook bytecodes triggered by logical signature. 2010-01-19 16:41:26 +02:00
Török Edvin
0fa95ef231 filesize, and pe_rawaddr API. 2010-01-18 19:31:59 +02:00
Török Edvin
f6798708fd Fix some pointer dereferences, and sizeof.
There were some variables initialized with values from dereferenced pointers,
and the null check after the init.
Also sizeof must be applied to pointed to element.
2010-01-15 18:20:22 +02:00
Török Edvin
9463f9fd90 Stack protector support. 2009-12-18 14:17:50 +02:00
Török Edvin
688799d126 yc_bytecode is able to unpack a file now! 2009-12-17 17:40:35 +02:00
Török Edvin
3ff75dbf0c Add clambc to the win32 build. 2009-12-11 21:02:23 +02:00
Török Edvin
d0934caf99 Distcheck fixes. 2009-12-11 21:02:19 +02:00
Török Edvin
482e97dbb2 Support for bytecode lines >8k.
Size is specified on first line (which must be <8k).
2009-12-11 16:05:38 +02:00
Török Edvin
0a11015bf5 Refactor trace API, so that trace printing happens in clambc.
This will allow clambc to implement breakpoints, and watchpoints.
2009-12-09 17:05:05 +02:00
Török Edvin
65c740d7d8 Add support for tracing (if bytecode compiled with support).
TODO: global id 0 is now a null pointer, need to adjust rest of conversion code
accordingly.
2009-12-08 23:02:49 +02:00
Török Edvin
34da9ae405 change bytecode format to allow structs with more than 16 fields. 2009-12-04 16:45:48 +02:00
Török Edvin
74b0023374 Fix after merge: update to fmap API. 2009-12-03 11:37:38 +02:00
Török Edvin
3ae0a76d03 Support for scanning files created by bytecode. 2009-12-02 17:30:17 +02:00