Frequently asked questions
Describe the bug
On Ubuntu 22.04 on ARM systems using php7.4 installed via ppa:ondrej/php, stripslashes hangs and segfaults on 16-character strings that end in a \ character.
To Reproduce
Steps to reproduce the behavior:
Call stripslashes on any 16-character string ending in \. For example stripslashes("1234567890abcde\\");
Expected behavior: returns the string 1234567890abcde.
Actual behavior: Segmentation Fault.
For example:
$ php --version
PHP 7.4.33 (cli) (built: Nov 8 2022 11:33:53) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
$ php -a
Interactive mode enabled
php > stripslashes("1234567890abcde\\");
Segmentation fault (core dumped)
This occurs on Ubuntu 22.04 on arm64 systems using php7.4 installed via ppa:ondrej/php.
The same does not occur on amd64 based systems, same versions of Ubuntu and PHP:
$ php --version
PHP 7.4.33 (cli) (built: Nov 8 2022 11:33:17) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
$ php -a
Interactive mode enabled
php > stripslashes("1234567890abcde\\");
php >
Your understanding of what is happening
I'm not sure. Some kind of bad memory access in string handling?
Distribution (please complete the following information):
- OS: Ubuntu
- Architecture: arm64
- Repository: Ubuntu PPA
Package(s) (please complete the following information):
$ apt-cache policy php7.4-cli
php7.4-cli:
Installed: 1:7.4.33-1+ubuntu22.04.1+deb.sury.org+1
Candidate: 1:7.4.33-1+ubuntu22.04.1+deb.sury.org+1
Version table:
*** 1:7.4.33-1+ubuntu22.04.1+deb.sury.org+1 500
500 http://ppa.launchpad.net/ondrej/php/ubuntu jammy/main arm64 Packages
100 /var/lib/dpkg/status
Frequently asked questions
Describe the bug
On Ubuntu 22.04 on ARM systems using php7.4 installed via
ppa:ondrej/php,stripslasheshangs and segfaults on 16-character strings that end in a\character.To Reproduce
Steps to reproduce the behavior:
Call
stripslasheson any 16-character string ending in\. For examplestripslashes("1234567890abcde\\");Expected behavior: returns the string
1234567890abcde.Actual behavior: Segmentation Fault.
For example:
This occurs on Ubuntu 22.04 on arm64 systems using php7.4 installed via
ppa:ondrej/php.The same does not occur on amd64 based systems, same versions of Ubuntu and PHP:
Your understanding of what is happening
I'm not sure. Some kind of bad memory access in string handling?
Distribution (please complete the following information):
Package(s) (please complete the following information):