Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cnijfilter_2_80 : filter crash #276125

Closed
ipoupaille opened this issue Dec 22, 2023 · 8 comments · Fixed by #276300
Closed

cnijfilter_2_80 : filter crash #276125

ipoupaille opened this issue Dec 22, 2023 · 8 comments · Fixed by #276300

Comments

@ipoupaille
Copy link

  1. Have a canon pixma mp210
  2. Have nixos-23.11 installed (with gnome)
  3. Install cnijfilter_2_80
  4. Try to print

The print filter crash

Notify maintainers

@jerith666

[user@system:~]$ journalctl -r
systemd-coredump[4715]: [🡕] Process 4708 (pstocanonij) of user 36 dumped core.
                                                 
                                                 Module libcap.so.2 without build-id.
                                                 Module libffi.so.8 without build-id.
                                                 Module libsystemd.so.0 without build-id.
                                                 Module libgmp.so.10 without build-id.
                                                 Module libhogweed.so.6 without build-id.
                                                 Module libnettle.so.8 without build-id.
                                                 Module libtasn1.so.6 without build-id.
                                                 Module libunistring.so.5 without build-id.
                                                 Module libidn2.so.0 without build-id.
                                                 Module libp11-kit.so.0 without build-id.
                                                 Module libdbus-1.so.3 without build-id.
                                                 Module libssp.so.0 without build-id.
                                                 Module libz.so.1 without build-id.
                                                 Module libgnutls.so.30 without build-id.
                                                 Module libavahi-client.so.3 without build-id.
                                                 Module libavahi-common.so.3 without build-id.
                                                 Module libcups.so.2 without build-id.
                                                 Module libpopt.so.0 without build-id.
                                                 Module pstocanonij without build-id.
                                                 Stack trace of thread 4708:
                                                 #0  0x00000000f7ef65b9 __kernel_vsyscall (linux-gate.so.1 + 0x5b9)
                                                 #1  0x00000000f7c8ce17 __pthread_kill_implementation (libc.so.6 + 0x8ce17)
                                                 #2  0x00000000f7c3a5c5 raise (libc.so.6 + 0x3a5c5)
                                                 #3  0x00000000f7c222d2 abort (libc.so.6 + 0x222d2)
                                                 #4  0x00000000f7c23355 __libc_message.cold (libc.so.6 + 0x23355)
                                                 #5  0x00000000f7d376f1 __fortify_fail (libc.so.6 + 0x1376f1)
                                                 #6  0x00000000f7d370dd __chk_fail (libc.so.6 + 0x1370dd)
                                                 #7  0x000000000804a3ef make_filter_param_list (pstocanonij + 0x23ef)
                                                 #8  0x000000000804a5ec make_filter_param_line (pstocanonij + 0x25ec)
                                                 #9  0x000000000804b1cf make_cmd_param.constprop.0 (pstocanonij + 0x31cf)
                                                 #10 0x0000000008049443 main (pstocanonij + 0x1443)
                                                 #11 0x00000000f7c23be9 __libc_start_call_main (libc.so.6 + 0x23be9)
                                                 #12 0x00000000f7c23cac __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x23cac)
                                                 #13 0x000000000804982c _start (pstocanonij + 0x182c)
                                                 ELF object binary architecture: Intel 80386

I do not know how I can debug this.

@eclairevoyant
Copy link
Member

how did you install the package, and how are you printing?

@ipoupaille
Copy link
Author

I installed the package with configuration.nix:

services.printing.enable = true;
programs.system-config-printer.enable = true;
services.printing.drivers = [ pkgs.cnijfilter_2_80 ];

I tried to print using LibreOffice writer on flatpak.
If i pin cnijfilter_2_80 from nixos-23.05, it is working:

{ pkgs, config, ... }:
let
  pinnedPkgs = import
    (pkgs.fetchFromGitHub {
      owner = "NixOS";
      repo = "nixpkgs";
      rev = "b2566f4f897ac6224e094b167d9488d03e157f28";
      sha256 = "sha256-u3XeJVRe/Q975nwFE+6ALEwypMKJEELMJKDAhSKyq3M=";
    })
    { config = config.nixpkgs.config; };
in
{
  services.printing.drivers = [ pinnedPkgs.cnijfilter_2_80 ];
}

@symphorien
Copy link
Member

Hello, the glibc in 23.11 has more hardening checks to detect buggy code, and this crash looks like the code in the filter is tripping one of those checks.
Can you try replacing pkgs.cnijfilter_2_80 by

(pkgs.cnijfilter_2_80.overrideAttrs(old: {
hardeningDisable = [ "fortify" ];
}))

and retry ?

@ipoupaille
Copy link
Author

This is working

symphorien added a commit to symphorien/nixpkgs that referenced this issue Dec 23, 2023
the cups filter crashes with hardening

Fixes NixOS#276125
symphorien added a commit to symphorien/nixpkgs that referenced this issue Dec 23, 2023
the cups filter crashes with hardening

Fixes NixOS#276125
@symphorien
Copy link
Member

can you test #276300 ?

@ipoupaille
Copy link
Author

This is working too

@risicle
Copy link
Contributor

risicle commented Dec 27, 2023

@ipoupaille does it work with

(pkgs.cnijfilter_2_80.overrideAttrs(old: {
hardeningDisable = [ "fortify3" ];
}))

(note fortify3 rather than fortify)

@risicle risicle reopened this Dec 27, 2023
@ipoupaille
Copy link
Author

Yes

symphorien added a commit to symphorien/nixpkgs that referenced this issue Dec 27, 2023
the cups filter crashes with hardening

Fixes NixOS#276125
github-actions bot pushed a commit that referenced this issue Dec 27, 2023
the cups filter crashes with hardening

Fixes #276125

(cherry picked from commit d4c1c32)
marcusramberg pushed a commit to marcusramberg/nixpkgs that referenced this issue Dec 30, 2023
the cups filter crashes with hardening

Fixes NixOS#276125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants