Package: libxerces-c-samples
Version: 3.2.4+debian-1
Severity: important
X-Debbugs-Cc: k.zmi...@gmail.com

-- System Information:
Debian Release: 12.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-18-amd64 (SMP w/1 CPU thread; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libxerces-c-samples depends on:
ii  libc6           2.36-9+deb12u4
ii  libgcc-s1       12.2.0-14
ii  libstdc++6      12.2.0-14
ii  libxerces-c3.2  3.2.4+debian-1

libxerces-c-samples recommends no packages.

libxerces-c-samples suggests no packages.



Hello


There seems to be bug when using StdInParse on Debian12 :

I did prepare a 2 test envs with fresh install of Debian11 and Debian12


Debian12

Linux konrad-debian12 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 
(2024-02-01) x86_64 GNU/Linux

libxerces-c-samples             3.2.4+debian-1                          
libxerces-c3.2                  3.2.4+debian-1                          
apache2                         2.4.59-1~deb12u1

Debian11

Linux konrad-debian11 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) 
x86_64 GNU/Linux

libxerces-c-samples             3.2.3+debian-3+deb11u1                  
libxerces-c3.2                  3.2.3+debian-3+deb11u1                  
apache2                         2.4.59-1~deb11u1



On debian 12

Trying to use StdInParse :


root@konrad-debian12:~# /usr/bin/StdInParse -n -v=always -s -f < /root/bopa.xml 


Fatal Error at (file , line 0, char 0): internal error in NetAccessor

Fatal Error at (file stdin, line 2, char 239): fatal error during schema scan



The error is caused by not fully reciving the generator.xsd (48KiB) from 
localhost apache (moved localy to rule out network)


Lets take a quick look at loopback

root@konrad-debian12:~# tcpdump -i lo
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on lo, link-type EN10MB (Ethernet), snapshot length 262144 bytes
14:19:16.982472 IP localhost.37128 > localhost.http: Flags [S], seq 3312200642, 
win 43690, options [mss 65495,sackOK,TS val 218223881 ecr 0,nop,wscale 10], 
length 0
14:19:16.982482 IP localhost.http > localhost.37128: Flags [S.], seq 
2074508043, ack 3312200643, win 43690, options [mss 65495,sackOK,TS val 
218223881 ecr 218223881,nop,wscale 10], length 0
14:19:16.982499 IP localhost.37128 > localhost.http: Flags [.], ack 1, win 43, 
options [nop,nop,TS val 218223881 ecr 218223881], length 0
14:19:16.982528 IP localhost.37128 > localhost.http: Flags [P.], seq 1:66, ack 
1, win 43, options [nop,nop,TS val 218223881 ecr 218223881], length 65: HTTP: 
GET /generator.xsd HTTP/1.1
14:19:16.982544 IP localhost.http > localhost.37128: Flags [.], ack 66, win 43, 
options [nop,nop,TS val 218223881 ecr 218223881], length 0
14:19:16.982816 IP localhost.http > localhost.37128: Flags [.], seq 1:22017, 
ack 66, win 43, options [nop,nop,TS val 218223881 ecr 218223881], length 22016: 
HTTP: HTTP/1.1 200 OK
14:19:16.982848 IP localhost.http > localhost.37128: Flags [P.], seq 
22017:44033, ack 66, win 43, options [nop,nop,TS val 218223881 ecr 218223881], 
length 22016: HTTP
14:19:16.982965 IP localhost.37128 > localhost.http: Flags [.], ack 22017, win 
22, options [nop,nop,TS val 218223882 ecr 218223881], length 0
14:19:16.983013 IP localhost.37128 > localhost.http: Flags [R.], seq 66, ack 
44033, win 43, options [nop,nop,TS val 218223882 ecr 218223881], length 0


the client stops reciving the data, and the generator.xsd gets cut at (44KiB  
and the complete file is 48KiB) :

If i follow the tcp session payload,  its clear that file is incomplete,

#Fragment that got cut at 44KiB

  <xs:attribute name="LevelValidationMethod" type="xs:string">
    <xs:annotation>
      <xs:documentat

Seems like a buffor problem ?

But to rule out packages version (as on debian 12 is 3.2.4+debian-1), i did 
install 3.2.3 from debian11 on debian12


libxerces-c-samples             3.2.3+debian-3+deb11u1                  
libxerces-c3.2                  3.2.3+debian-3+deb11u1                  

But stil got the same outcome, but at the same version on debian 11

root@konrad-debian11:~# /usr/bin/StdInParse -n -v=always -s -f < /root/bopa.xml
stdin: 163 ms (458 elems, 2120 attrs, 8806 spaces, 0 chars)

works just fine, so package version and network ruled out 


One more thing to attach ldd for :

libxerces-c-samples             3.2.3+debian-3+deb11u1                  
libxerces-c3.2:amd64            3.2.3+debian-3+deb11u1                  

Debian 12

 ldd /usr/bin/StdInParse
    linux-vdso.so.1 (0x00007ffdd67e1000)
    libxerces-c-3.2.so => /lib/x86_64-linux-gnu/libxerces-c-3.2.so 
(0x00007f4e59000000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4e58c00000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4e594e8000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4e58e1f000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 
(0x00007f4e594e3000)
    libcurl-gnutls.so.4 => /lib/x86_64-linux-gnu/libcurl-gnutls.so.4 
(0x00007f4e59436000)
    libicuuc.so.67 => /lib/x86_64-linux-gnu/libicuuc.so.67 (0x00007f4e58a17000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4e58938000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f4e5951c000)
    libnghttp2.so.14 => /lib/x86_64-linux-gnu/libnghttp2.so.14 
(0x00007f4e59407000)
    libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f4e593d6000)
    librtmp.so.1 => /lib/x86_64-linux-gnu/librtmp.so.1 (0x00007f4e593b5000)
    libssh2.so.1 => /lib/x86_64-linux-gnu/libssh2.so.1 (0x00007f4e588f7000)
    libpsl.so.5 => /lib/x86_64-linux-gnu/libpsl.so.5 (0x00007f4e593a1000)
    libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x00007f4e588a9000)
    libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 
(0x00007f4e58600000)
    libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 
(0x00007f4e58857000)
    libldap-2.5.so.0 => /lib/x86_64-linux-gnu/libldap-2.5.so.0 
(0x00007f4e585a1000)
    liblber-2.5.so.0 => /lib/x86_64-linux-gnu/liblber-2.5.so.0 
(0x00007f4e58847000)
    libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f4e584e5000)
    libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 
(0x00007f4e5883a000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f4e584c6000)
    libicudata.so.67 => /lib/x86_64-linux-gnu/libicudata.so.67 
(0x00007f4e56800000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4e58e1a000)
    libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 
(0x00007f4e5664a000)
    libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 
(0x00007f4e5847d000)
    libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f4e583fc000)
    libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007f4e56000000)
    libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 
(0x00007f4e56516000)
    libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f4e58823000)
    libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f4e58322000)
    libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 
(0x00007f4e564e9000)
    libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 
(0x00007f4e5881d000)
    libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 
(0x00007f4e564db000)
    libsasl2.so.2 => /lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f4e564be000)
    libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 
(0x00007f4e5649b000)
    libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007f4e5648f000)
    libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 
(0x00007f4e58319000)
    libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f4e55fef000)


    Debian 11

    ldd /usr/bin/StdInParse
    linux-vdso.so.1 (0x00007ffdf8bdd000)
    libxerces-c-3.2.so => /lib/x86_64-linux-gnu/libxerces-c-3.2.so 
(0x00007f8206e93000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8206cc6000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8206cac000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8206ad8000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 
(0x00007f8206ab6000)
    libcurl-gnutls.so.4 => /lib/x86_64-linux-gnu/libcurl-gnutls.so.4 
(0x00007f8206a1c000)
    libicuuc.so.67 => /lib/x86_64-linux-gnu/libicuuc.so.67 (0x00007f8206831000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f82066ed000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f8207243000)
    libnghttp2.so.14 => /lib/x86_64-linux-gnu/libnghttp2.so.14 
(0x00007f82066bf000)
    libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f820669e000)
    librtmp.so.1 => /lib/x86_64-linux-gnu/librtmp.so.1 (0x00007f820667f000)
    libssh2.so.1 => /lib/x86_64-linux-gnu/libssh2.so.1 (0x00007f820664a000)
    libpsl.so.5 => /lib/x86_64-linux-gnu/libpsl.so.5 (0x00007f8206634000)
    libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x00007f82065ec000)
    libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 
(0x00007f82063ec000)
    libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 
(0x00007f8206399000)
    libldap_r-2.4.so.2 => /lib/x86_64-linux-gnu/libldap_r-2.4.so.2 
(0x00007f8206343000)
    liblber-2.4.so.2 => /lib/x86_64-linux-gnu/liblber-2.4.so.2 
(0x00007f8206332000)
    libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 
(0x00007f8206322000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8206305000)
    libicudata.so.67 => /lib/x86_64-linux-gnu/libicudata.so.67 
(0x00007f82047ec000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f82047e6000)
    libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 
(0x00007f8204664000)
    libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 
(0x00007f8204619000)
    libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f8204598000)
    libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 
(0x00007f8204478000)
    libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 
(0x00007f8204344000)
    libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f820432e000)
    libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f8204252000)
    libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 
(0x00007f8204222000)
    libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 
(0x00007f820421c000)
    libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 
(0x00007f820420d000)
    libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f82041f3000)
    libsasl2.so.2 => /lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f82041d6000)
    libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 
(0x00007f82041b1000)
    libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 
(0x00007f820418b000)
    libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007f820417f000)
    libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 
(0x00007f8204178000)

Interesting thing is, that if on debian 12 i do a loop to run (50x
attempts) There will be few sucessfull runs.

Reply via email to