[ Upstream commit 97f3c0a4b0579b646b6b10ae5a3d59f0441cc12c ] I found an ACPI cache leak in ACPI early termination and boot continuing case. When early termination occurs due to malicious ACPI table, Linux kernel terminates ACPI function and continues to boot process. While kernel terminates ACPI function, kmem_cache_destroy() reports Acpi-Operand cache leak. Boot log of ACPI operand cache leak is as follows: >[ 0.464168] ACPI: Added _OSI(Module Device) >[ 0.467022] ACPI: Added _OSI(Processor Device) >[ 0.469376] ACPI: Added _OSI(3.0 _SCP Extensions) >[ 0.471647] ACPI: Added _OSI(Processor Aggregator Device) >[ 0.477997] ACPI Error: Null stack entry at ffff880215c0aad8 (20170303/exresop-174) >[ 0.482706] ACPI Exception: AE_AML_INTERNAL, While resolving operands for [opcode_name unavailable] (20170303/dswexec-461) >[ 0.487503] ACPI Error: Method parse/execution failed [DBG] (Node ffff88021710ab40), AE_AML_INTERNAL (20170303/psparse-543) >[ 0.492136] ACPI Error: Method parse/execution failed [_SB._INI] (Node ffff88021710a618), AE_AML_INTERNAL (20170303/psparse-543) >[ 0.497683] ACPI: Interpreter enabled >[ 0.499385] ACPI: (supports S0) >[ 0.501151] ACPI: Using IOAPIC for interrupt routing >[ 0.503342] ACPI Error: Null stack entry at ffff880215c0aad8 (20170303/exresop-174) >[ 0.506522] ACPI Exception: AE_AML_INTERNAL, While resolving operands for [opcode_name unavailable] (20170303/dswexec-461) >[ 0.510463] ACPI Error: Method parse/execution failed [DBG] (Node ffff88021710ab40), AE_AML_INTERNAL (20170303/psparse-543) >[ 0.514477] ACPI Error: Method parse/execution failed [_PIC] (Node ffff88021710ab18), AE_AML_INTERNAL (20170303/psparse-543) >[ 0.518867] ACPI Exception: AE_AML_INTERNAL, Evaluating _PIC (20170303/bus-991) >[ 0.522384] kmem_cache_destroy Acpi-Operand: Slab cache still has objects >[ 0.524597] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc5 TinkerBoard#26 >[ 0.526795] Hardware name: innotek gmb_h virtual_box/virtual_box, BIOS virtual_box 12/01/2006 >[ 0.529668] Call Trace: >[ 0.530811] ? dump_stack+0x5c/0x81 >[ 0.532240] ? kmem_cache_destroy+0x1aa/0x1c0 >[ 0.533905] ? acpi_os_delete_cache+0xa/0x10 >[ 0.535497] ? acpi_ut_delete_caches+0x3f/0x7b >[ 0.537237] ? acpi_terminate+0xa/0x14 >[ 0.538701] ? acpi_init+0x2af/0x34f >[ 0.540008] ? acpi_sleep_proc_init+0x27/0x27 >[ 0.541593] ? do_one_initcall+0x4e/0x1a0 >[ 0.543008] ? kernel_init_freeable+0x19e/0x21f >[ 0.546202] ? rest_init+0x80/0x80 >[ 0.547513] ? kernel_init+0xa/0x100 >[ 0.548817] ? ret_from_fork+0x25/0x30 >[ 0.550587] vgaarb: loaded >[ 0.551716] EDAC MC: Ver: 3.0.0 >[ 0.553744] PCI: Probing PCI hardware >[ 0.555038] PCI host bridge to bus 0000:00 > ... Continue to boot and log is omitted ... I analyzed this memory leak in detail and found acpi_ns_evaluate() function only removes Info->return_object in AE_CTRL_RETURN_VALUE case. But, when errors occur, the status value is not AE_CTRL_RETURN_VALUE, and Info->return_object is also not null. Therefore, this causes acpi operand memory leak. This cache leak causes a security threat because an old kernel (<= 4.9) shows memory locations of kernel functions in stack dump. Some malicious users could use this information to neutralize kernel ASLR. I made a patch to fix ACPI operand cache leak. Signed-off-by: Seunghun Han <kkamagui@gmail.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
I am trying to compile a C program using Netbeans IDE and windows 7 32 bit operating system. The program has references to following headers
#include <openssl/bio.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
I have downloaded the openssl package from Cygwin. I am able to run Openssl.exe from the C:cygwinbinopenssl.exe path successfully without any error.I have defined system environment variable and include directories in c compiler to C:cygwinbin.
But when program is compiled I am getting «openssl/bio.h: No such file or directory» fatal error.
As an alternative I downloaded ‘openssl_1.1.1.orig.tar.gz’ and expanded the same using cygwin terminal. The folders do contain all the required header files but I am seeing the same error even after setting the include directory path to newly downloaded directory.
Please let me know where I am going wrong.
Bodo
8,7161 gold badge13 silver badges29 bronze badges
asked Oct 11, 2019 at 10:32
6
You need to install the libssl-devel package
$ cygcheck -p usr/include/openssl/bio.h
Found 3 matches for usr/include/openssl/bio.h
libssl-devel-1.1.1b-1 - libssl-devel: A general purpose cryptography toolkit with TLS implementation (development)
libssl-devel-1.1.1c-1 - libssl-devel: A general purpose cryptography toolkit with TLS implementation (development)
libssl-devel-1.1.1d-1 - libssl-devel: A general purpose cryptography toolkit with TLS implementation (development)
answered Oct 14, 2019 at 8:10
matzerimatzeri
7,8042 gold badges14 silver badges16 bronze badges
OpenSSL libraries are required to build OpenSSL-based applications. While trying to build by using gcc with openssl library and function the -lssl option is used. But you may get an error like “foo.cpp:21:25: error: openssl/bio.h: No such file or directory” which means the openssl library can not be found or not installed. In this tutorial, we will learn how to install OpenSSL libraries to build applications in Ubuntu, Debian, Mint.
OpenSSL Headers and Build Errors
OpenSSL provides a lot of features for security. All of them are categorized under diffrent C header files. Below we list some of the most popular OpenSSL library headers. If you need one of them the OpenSSL library should be installed for the current operating system.
#include <openssl/bio.h>
#include <openssl/buffer.h>
#include <openssl/des.h>
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <openssl/rsa.h>
If the OpenSSL development library is not installed when you try to build the C application with OpenSSL library dependency you will get the following errors. The build operation with the OpenSSL library can be start with the following gcc command.
gcc -lssl sample.cpp
sample.cpp:21:25: error: openssl/bio.h: No such file or directory
sample.cpp:22:28: error: openssl/buffer.h: No such file or directory
sample.cpp:23:25: error: openssl/des.h: No such file or directory
sample.cpp:24:25: error: openssl/evp.h: No such file or directory
sample.cpp:25:25: error: openssl/pem.h: No such file or directory
sample.cpp:26:25: error: openssl/rsa.h: No such file or directory
Install OpenSSL Development Libraries and Packages
The OpenSSL Development Libraries and Packages are provided with the name “libssl-dev”. The “libssl-dev” is the package name for the Ubuntu, Debian, Mint, and related apt-based distributions. Before installing the OpenSSL development libraries and package we can display information about it.
apt show libssl-dev
Package: libssl-dev Version: 1.1.1f-1ubuntu4.3 Priority: optional Section: libdevel Source: openssl Origin: Ubuntu Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Original-Maintainer: Debian OpenSSL Team pkg-openssl-devel@lists.alioth.debian.org Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 8.050 kB Depends: libssl1.1 (= 1.1.1f-1ubuntu4.3) Suggests: libssl-doc Conflicts: libssl1.0-dev Homepage: https://www.openssl.org/ Download-Size: 1.586 kB APT-Manual-Installed: yes APT-Sources: http://tr.archive.ubuntu.com/ubuntu groovy-updates/main amd64 Packages Description: Secure Sockets Layer toolkit - development files This package is part of the OpenSSL project's implementation of the SSL and TLS cryptographic protocols for secure communication over the Internet. . It contains development libraries, header files, and manpages for libssl and libcrypto. N: There is 1 additional record. Please use the '-a' switch to see it
By using the following command the OpenSSL Development Libraries and package can be installed.
sudo apt install libssl-dev

The package name “libssl” is the name of the package and the “dev” is used specify that this package is a development library.
If you are using apt-get command instead of the apt in order to manage packages you can use the following command to install OpenSSQL development libraries and package.
sudo apt-get install libssl-dev
Install OpenSSL Development Libraries From Source
Alternatively the OpenSSL Development libraries can be installed from the source code. First the source code should be compiled into the binary and then installed properly. The adventage of the using source code is we can select whatever version we want. There is no dependency to the specific version provided by the Linux distribution. Disadventage of installing OpenSSL develpoment libraries from source is it is not easy as installing with package manager. There are multiple steps for this.
Download the OpenSSL source code from the openssl.org. You can select whatever version you want. In this example we download openssl-1.0.1.
wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz
Extract the compressed openssl source code with the tar command.
tar -xvzf openssl-1.0.1g.tar.gz
Navigate too the extracted openssl directory.
cd openssl-1.0.1g
Configure the openssl source code for compile operation.
./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
Compile the openssl and development libraries with the make command.
make
Install the compiled openssl binaries and development libraries with the “make install” command.
make install
Navigate to the OpenSSL installation directory and execute openssl command in order to check its version.
/usr/local/openssl/bin/openssl version
The output is like below.
OpenSSL 1.0.1g 7 Apr 2015
-
Strahd_Zarovich
- Posts: 3
- Joined: 2010/03/04 10:14:27
Compile problem
g++ -DHAVE_CONFIG_H -I../../.. -I../.. -DACE_SSL_BUILD_DLL -W -Wall -Wpointer-arith -g -O2 -pthread -pipe -O3 -MT libACE_SSL_la-SSL_Asynch_BIO.lo -MD -MP -MF .deps/libACE_SSL_la-SSL_Asynch_BIO.Tpo -c ../../../ace/SSL/SSL_Asynch_BIO.cpp -fPIC -DPIC -o .libs/libACE_SSL_la-SSL_Asynch_BIO.o
In file included from ../../../ace/SSL/SSL_Asynch_BIO.cpp:3:
../../../ace/SSL/SSL_Asynch_BIO.h:29:25: error: openssl/bio.h: No such file or directory
make[3]: *** [libACE_SSL_la-SSL_Asynch_BIO.lo] Error 1
make[3]: Leaving directory `/ACE/build/ace/SSL’
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/ACE/build/ace’
make[1]: *** [all] Error 2
make[1]: Leaving directory `/ACE/build/ace’
make: *** [all-recursive] Error 1
How can I resolve this?
-
markkuk
- Posts: 739
- Joined: 2007/09/07 10:56:28
- Location: Finland
Re: Compile problem
Post
by markkuk » 2010/03/04 13:48:24
[quote]
Strahd_Zarovich wrote:
g++ -DHAVE_CONFIG_H -I../../.. -I../.. -DACE_SSL_BUILD_DLL -W -Wall -Wpointer-arith -g -O2 -pthread -pipe -O3 -MT libACE_SSL_la-SSL_Asynch_BIO.lo -MD -MP -MF .deps/libACE_SSL_la-SSL_Asynch_BIO.Tpo -c ../../../ace/SSL/SSL_Asynch_BIO.cpp -fPIC -DPIC -o .libs/libACE_SSL_la-SSL_Asynch_BIO.o
In file included from ../../../ace/SSL/SSL_Asynch_BIO.cpp:3:
../../../ace/SSL/SSL_Asynch_BIO.h:29:25: error: openssl/bio.h: No such file or directory
How can I resolve this?[/quote]
Find the package that provides the missing file and install it:
[code]yum provides ‘*openssl/bio.h'[/code]
[code]yum install openssl-devel[/code]
-
gerald_clark
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Compile problem
Post
by gerald_clark » 2010/03/04 14:18:15
Welcome to CentOS.
Please read the new member information.
http://www.centos.org/modules/newbb/viewforum.php?forum=47
Try to find your desired program in the repos before you try to compile it.
-
Strahd_Zarovich
- Posts: 3
- Joined: 2010/03/04 10:14:27
Re: Compile problem
Post
by Strahd_Zarovich » 2010/03/04 16:23:07
[quote]
markkuk wrote:
Find the package that provides the missing file and install it:
[code]yum provides ‘*openssl/bio.h'[/code]
[code]yum install openssl-devel[/code][/quote]
yum provides ‘*openssl/bio.h’
>
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: mirror.XXXXXX
* base: mirror.XXXXXX
* extras: mirror.XXXXXX
* updates: ftp.linux.org.tr
openssl-devel-0.9.8e-12.el5.i386 : Files for development of applications which
: will use OpenSSL
Repo : base
Matched from:
Filename : /usr/include/openssl/bio.h
openssl-devel-0.9.8e-12.el5_4.1.i386 : Files for development of applications
: which will use OpenSSL
Repo : updates
Matched from:
Filename : /usr/include/openssl/bio.h
openssl-devel-0.9.8e-12.el5_4.1.i386 : Files for development of applications
: which will use OpenSSL
Repo : installed
Matched from:
Filename : /usr/include/openssl/bio.h
—————————————————
yum install openssl-devel
>
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: mirror.XXXXXX
* base: mirror.XXXXXX
* extras: mirror.XXXXXX
* updates: ftp.linux.org.tr
Setting up Install Process
Package openssl-devel-0.9.8e-12.el5_4.1.i386 already installed and latest version
Nothing to do
[quote]
gerald_clark wrote:
Welcome to CentOS.
Please read the new member information.
http://www.centos.org/modules/newbb/viewforum.php?forum=47
Try to find your desired program in the repos before you try to compile it.[/quote]
Ok. I will read soon.
-
pschaff
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: Compile problem
Post
by pschaff » 2010/03/04 22:17:12
[quote]
Strahd_Zarovich wrote:
[quote]
gerald_clark wrote:
…
Try to find your desired program in the repos before you try to compile it.[/quote]
Ok. I will read soon.[/quote]
Guessing from the directory structure, tried a google on[code]ace «src.rpm»[/code]and the first hit is [url=http://dir.filewatcher.com/d/Other/src/Development/Libraries/ACE-5.1-1.src.rpm.11406554.html]The ADAPTIVE Communication Environment[/url]
Don’t see it in the «usual» repos, but if my guess was correct I suggest grabbing a SRPM from the above link and reading [url=http://wiki.centos.org/HowTos/RebuildSRPM]How to Rebuild a Source RPM[/url].
