php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73508 Crash Blenc
Submitted: 2016-11-12 20:08 UTC Modified: 2017-01-10 08:33 UTC
From: honor dot ston3 at gmail dot com Assigned:
Status: Suspended Package: BLENC (PECL)
PHP Version: 5.6.28 OS: *nix
Private report: No CVE-ID: None
 [2016-11-12 20:08 UTC] honor dot ston3 at gmail dot com
Description:
------------
-

Test script:
---------------
<?php

$source_code = file_get_contents($argv[1]);
$redistributable_key = blenc_encrypt($source_code, "my_source_encoded.php");
?>

Actual result:
--------------
ASAN:DEADLYSIGNAL
=================================================================
==15732==ERROR: AddressSanitizer: SEGV on unknown address 0x7661b2e4 (pc 0x09241488 bp 0x0ecc365c sp 0xbfb0b2f0 T0)
    #0 0x9241487  (/home/x/Desktop/5php-dev/bin/php+0x9241487)
    #1 0x9247259  (/home/x/Desktop/5php-dev/bin/php+0x9247259)
    #2 0x938977a  (/home/x/Desktop/5php-dev/bin/php+0x938977a)
    #3 0x9389b8c  (/home/x/Desktop/5php-dev/bin/php+0x9389b8c)
    #4 0x92ee842  (/home/x/Desktop/5php-dev/bin/php+0x92ee842)
    #5 0x9346d84  (/home/x/Desktop/5php-dev/bin/php+0x9346d84)
    #6 0x91219b1  (/home/x/Desktop/5php-dev/bin/php+0x91219b1)
    #7 0x96b28be  (/home/x/Desktop/5php-dev/bin/php+0x96b28be)
    #8 0x96aeafd  (/home/x/Desktop/5php-dev/bin/php+0x96aeafd)
    #9 0xb7332636  (/lib/i386-linux-gnu/libc.so.6+0x18636)
    #10 0x8098477  (/home/x/Desktop/5php-dev/bin/php+0x8098477)



Program received signal SIGSEGV, Segmentation fault.
0x0923d2de in _zend_mm_alloc_int (heap=<optimized out>, size=<optimized out>) at Zend/zend_alloc.c:2020
2020			ZEND_MM_CHECK_BLOCK_LINKAGE(best_fit);
(gdb) bt
#0  0x0923d2de in _zend_mm_alloc_int (heap=<optimized out>, size=<optimized out>) at Zend/zend_alloc.c:2020
#1  0x09248177 in _emalloc (size=<optimized out>) at Zend/zend_alloc.c:2429
#2  _estrdup (s=0xb4bdd924 "f5951823fb6fe699a43e7d121b45a2a4") at Zend/zend_alloc.c:2640
#3  0xb4b681e8 in php_blenc_encode (script=<optimized out>, key=<optimized out>, in_len=<optimized out>, 
    out_len=<optimized out>) at blenc.c:386
#4  0xb4b65638 in zif_blenc_encrypt (ht=<optimized out>, return_value=<optimized out>, 
    return_value_ptr=<optimized out>, this_ptr=<optimized out>, return_value_used=<optimized out>)
    at blenc.c:263
#5  0x095f175d in zend_do_fcall_common_helper_SPEC (execute_data=<optimized out>)
    at Zend/zend_vm_execute.h:558
#6  0x0943c866 in execute_ex (execute_data=<optimized out>) at Zend/zend_vm_execute.h:363
#7  0x0943e8cb in zend_execute (op_array=<optimized out>) at Zend/zend_vm_execute.h:388
#8  0x09347649 in zend_execute_scripts (type=<optimized out>, retval=<optimized out>, 
    file_count=<optimized out>) at Zend/zend.c:1341
#9  0x091286c2 in php_execute_script (primary_file=0x8) at main/main.c:2613
#10 0x096b1972 in do_cli (argc=<optimized out>, argv=<optimized out>) at sapi/cli/php_cli.c:998
#11 0x096aeafe in main (argc=<optimized out>, argv=<optimized out>) at sapi/cli/php_cli.c:1382


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-10 08:33 UTC] kalle@php.net
-Status: Open +Status: Suspended
 [2017-01-10 08:33 UTC] kalle@php.net
I'm suspending the reports for BLENC as it doesn't seem to have stalled (looking at both repositories I could find on git.php.net and github) and it does not seem compatible with any currently supported version of PHP either. Please unsuspend in case someone takes over this extension
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC