[Pkg-hpijs-devel] Bug#495005: xsane segfaults

Julien BLACHE jblache at debian.org
Wed Aug 13 19:36:51 UTC 2008


reassign 495005 hplip 2.8.6-2
retitle 495005 hpaio backend writes to fd 0, breaks saned/net
severity 495005 important
thanks

Julien Danjou <acid at debian.org> wrote:

Hi hplip folks,

>> That kind of segfault in the net protocol stack is usually due to a
>> standard violation by the remote backend.

> Acually, I managed to get it work using saned -a, so I can't get any
> debug value which might help, since inetd mode does not support debug.
>
> Using saned from inetd still make the remote xsane/xscanimage to
> ask for authentication and then segfault.

This is a clear indication that the hpaio backend is writing to fd 0.

It's a bug in the code, either a fd declared static that's not
initialized to -1, or an fd explicitely initialized to 0, or, more
likely, the fd member of a struct that gets memset() after allocation
and is not properly initialized to -1 afterwards.

In any case, this breaks saned when run through inetd which is
guaranteed to render hpaio unusable over the network with the net
backend as whatever is written to fd 0 will confuse the hell out of
the net protocol stack.

JB.

-- 
 Julien BLACHE <jblache at debian.org>  |  Debian, because code matters more 
 Debian & GNU/Linux Developer        |       <http://www.debian.org>
 Public key available on <http://www.jblache.org> - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 



More information about the Pkg-hpijs-devel mailing list