Application can crash if linked against both libppd and libcups
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Comienza reproduciendo el fallo dependiente del orden de enlace usando ppdOpenFd, ppdLoadAttributes y ppdClose tanto con libcups.so como con libppd.so. Inspecciona las distintas implementaciones de ppd_file_t y de la caché, junto con las declaraciones públicas de la API de libcups. Se considera completado cuando haya una solución acordada que evite que el objeto de bibliotecas mezcladas falle, pero el issue no identifica un camino de implementación específico.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
CUPS, on its sources, implements (duplicates implementation) of some, but not all, libppd functions, and exports them from the libcups.so library.
For example, the ppdOpenFd and ppdClose functions are exported from the libcups.so, while ppdLoadAttributes is not.
If the application is linked against both libcups.so and libppd.so libraries, the following scenario is possible:
- application calls
ppdOpenFdfrom thelibcups.so - application calls
ppdLoadAttributes, and this call is now goes into thelibppd.solibrary. This function modifies theppd_file_tstructure, but the definition of this type is not exactly the same between these two libraries (the actual difference seems to be in theppd_cache_tin thelibppdvs_ppd_cache_sin thelibcups.so) - application calls
ppdCloseand this call goes to thelibcups.soand crashes there in attempt to destroy the_ppd_cache_sstructure, which was actually created in thelibppd.so
The exact behaviour depends on a link order; if libppd is linked first, everything is OK, while if libcups is linked first, application crashed.
I've caught this issue at Fedora 40 with cups-2.4.11-1.fc40.x86_64 and libppd-2.1~b1-2.fc40.x86_64 packages installed, but most likely it may affect other distros and other version.
It is hard to say what could be a perfect solution for this problem, because libcups header files announces exporting many ppdXXX functions, so this is a part of the libcups public API. And without linking of the libcups.so the libppd.so functions that use ipp_t and ipp_attribute_t become unusable, because these types are opaque and accessible only via libcups.so-exported API...
- Lenguaje dominante
- C
- Estrellas
- 6
- Forks
- 38
- Merge medio
- 16 h 30 min
- PR fusionados (30 d)
- 25
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de OpenPrinting/libppd
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
OpenPrinting/libppd#119 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 70/100
OpenPrinting/libppd#95 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
OpenPrinting/libppd#93 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
OpenPrinting/libppd#90 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
OpenPrinting/libppd#65 ·
Los mantenedores suelen responder en 1 día
Todos los issues de OpenPrinting/libppd
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
python-pillow/Pillow#10590 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
CCExtractor/ccextractor#2478 ·
Los mantenedores suelen responder en 7 días
-
增加kmod-nft-queueAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
ESPresense/ESPresense#2680 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
OpenPrinting/cups#1828 · 4 comentarios ·
Los mantenedores suelen responder en 1 día