[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#869777: yara tests fail on ARM32, when run on a 64bit kernel



Package: src:yara
Version: 3.6.3+dfsg-1
Forwarded: https://github.com/VirusTotal/yara/issues/716
Tags: upstream

yara tests fail on ARM32, when run on a 64bit kernel.

This turns out to be because the codebase is full of code that assumes unaligned
access is OK, for example stuff like this
https://github.com/VirusTotal/yara/blob/master/libyara/exec.c#L224 but also
more subtly stuff like
https://github.com/VirusTotal/yara/blob/master/libyara/scan.c#L409
(new_match is only guaranteed to be 4-byte-aligned and crashes when you access
an 8 byte field).

make  check-TESTS
make[3]: Entering directory '/<<BUILDDIR>>/yara-3.6.3+dfsg'
make[4]: Entering directory '/<<BUILDDIR>>/yara-3.6.3+dfsg'
PASS: test-alignment
FAIL: test-rules
FAIL: test-pe
FAIL: test-elf
PASS: test-version
FAIL: test-exception
==================================
   yara 3.6.3: ./test-suite.log
==================================

# TOTAL: 6
# PASS:  2
# SKIP:  0
# XFAIL: 0
# FAIL:  4
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test-rules
================

yr_rules_scan_mem: error
FAIL test-rules (exit status: 1)

FAIL: test-pe
=============

yr_rules_scan_mem: error
FAIL test-pe (exit status: 1)

FAIL: test-elf
==============

yr_rules_scan_mem: error
FAIL test-elf (exit status: 1)

FAIL: test-exception
====================

Scanning for "aaaa"...
err = 4, matches = 0
Sending blocked SIGUSR1 to ourselves...
Scanning for {00 00 00 00}...
err = 4, matches = 0
Scanning for "aaaa"...
err = 4, matches = 0
Expected subprocess to be terminated by signal
Test: crash
Test: crash-no-handle
Test: blocked-signal
Test: crash-other-thread
FAIL test-exception (exit status: 1)

============================================================================
Testsuite summary for yara 3.6.3
============================================================================
# TOTAL: 6
# PASS:  2
# SKIP:  0
# XFAIL: 0
# FAIL:  4
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to vmalvarez at virustotal.com
============================================================================
Makefile:1000: recipe for target 'test-suite.log' failed
make[4]: *** [test-suite.log] Error 1



Reply to: