Hi all,
I apologize for my bad english, since it is not my mother tongue.
I already use a Pulp 2 server. I wanted to build a new infrastructure for a Pulp 3 server. Pulp-in-one-container seemed a good solution for me.
Operating system - distribution and version:
Our standard OS in this case is a Debian 12 Bookworm (12.5).
The container engine is Podman (4.3.1).
For security reasons, the production infrastructure is working offline, I mean without any internet access.
So to populate my server I built another server in an “online zone” with pulp-in-one-container. Works like a charm !
Problem:
I followed the instructions found in the import-export documentation.
I exported easily the content of the repository I populated, producing a tar file and a json one. Fine also.
On the offline side, I also have a pulp-in-one-container. So I transferred the both export files produced and tried to import them the way explained in the documentation.
But whatever I tried the import failed.
I mean the call to the API is ok, but the task launched afterwards fails. In the Podman logs, I can see a Python error you can see below.
It seems a Python 3.9 limitation related to the CVE-2007-4559
If I follow what is explained in the error message the security flaw is fixed in Python 3.14 since pulp-in-one-container is using Python 3.9.
As a reference about Python versions related to the CVE-2007-4559.
Expected outcome:
Import successful…
Workaround? Solution?
The workaround seems to be a code modification.
But it can be also an upgrade of the Python version (3.14 minimum) embedded in the container. So a new version of the container.
Other relevant data:
pulp [cb89d45521b14b52949e881195e07166]: pulpcore.app.tasks.importer:INFO: Validating TOC /var/lib/import_export/IMPORTS/export-018ee71f-cc60-7eb4-bea9-63f157bc9b00-20240416_1336-toc.json.
pulp [cb89d45521b14b52949e881195e07166]: pulpcore.app.tasks.importer:INFO: Importing /var/lib/import_export/IMPORTS/export-018ee71f-cc60-7eb4-bea9-63f157bc9b00-20240416_1336-toc.json.
/usr/lib64/python3.9/tarfile.py:2239: RuntimeWarning: The default behavior of tarfile extraction has been changed to disallow common exploits (including CVE-2007-4559). By default, absolute/parent paths are disallowed and some mode bits are cleared. See https://access.redhat.com/articles/7004769 for more details.
warnings.warn(
pulp [cb89d45521b14b52949e881195e07166]: pulpcore.app.tasks.importer:INFO: Importing file ./tmpwp0cngvt/pulpcore.app.modelresource.ArtifactResource.json.
pulp [cb89d45521b14b52949e881195e07166]: pulpcore.app.tasks.importer:INFO: ...Importing resource ArtifactResource.
pulp [cb89d45521b14b52949e881195e07166]: pulpcore.tasking.tasks:INFO: Task completed 018f05d1-d945-76b6-842c-00fd92b5a7e7
pulp [cb89d45521b14b52949e881195e07166]: pulpcore.tasking.tasks:INFO: Starting task 018f05d1-e9e3-7593-aa90-133b1ad56648
/usr/lib64/python3.9/tarfile.py:2239: RuntimeWarning: The default behavior of tarfile extraction has been changed to disallow common exploits (including CVE-2007-4559). By default, absolute/parent paths are disallowed and some mode bits are cleared. See https://access.redhat.com/articles/7004769 for more details.
warnings.warn(
pulp [cb89d45521b14b52949e881195e07166]: pulpcore.tasking.tasks:INFO: Task 018f05d1-e9e3-7593-aa90-133b1ad56648 failed ('NoneType' object is not iterable)
pulp [cb89d45521b14b52949e881195e07166]: pulpcore.tasking.tasks:INFO: File "/usr/local/lib/python3.9/site-packages/pulpcore/tasking/tasks.py", line 66, in _execute_task
result = func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/pulpcore/app/tasks/importer.py", line 375, in import_repository_version
for res_class in cfg.exportable_classes:```