Bug 8753 - Printing Fails with buffer overflow
Printing Fails with buffer overflow
Product: Samba 3.6
Classification: Unclassified
Component: Printing
x64 Linux
: P5 critical
: ---
Assigned To: printing-maintainers
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2012-02-08 19:36 UTC by Tom R
Modified: 2013-01-18 15:58 UTC (History)
1 user (show)

See Also:

Zipfile containing level 10 log (42 bytes, text/plain)
2012-02-08 19:38 UTC, Tom R
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom R 2012-02-08 19:36:58 UTC
When we try to print PDF documents (as well as other types), we experience a buffer overflow. I've attached a level 10 log level.

basically, I get

2012/02/08 13:53:08.699274, 10] rpc_server/srv_pipe_hnd.c:788(np_read_recv)
  Received 1024 bytes. There is more data outstanding
[2012/02/08 13:53:08.699345,  5] smbd/ipc.c:103(send_trans_reply)
  send_trans_reply: buffer 1024 too large
[2012/02/08 13:53:08.699410,  5] smbd/ipc.c:62(copy_trans_params_and_data)
  copy_trans_params_and_data: params[0..0] data[0..1024] (align 0)
[2012/02/08 13:53:08.699473,  3] smbd/error.c:81(error_packet_set)
  error packet at smbd/ipc.c(137) cmd=37 (SMBtrans) STATUS_BUFFER_OVERFLOW
Comment 1 Tom R 2012-02-08 19:38:33 UTC
Created attachment 7308 [details]
Zipfile containing level 10 log
Comment 2 Andreas Schneider 2012-10-11 13:01:29 UTC
I dunno what this is a network trace is needed too.


This is a small howto to help you to provide all information which are needed
to find out what's going on your machine. This is a general howto so maybe it
will cover more things you don't use.

Please also read http://www.chiark.greenend.org.uk/~sgtatham/bugs

Providing instructions how the reproduce the error

The first aim of a bug report is to let the developer see the failure with
their own eyes. If you can't be with them to make it fail in front of them,
give them detailed instructions how to reproduce the problem so that they can
reproduce the error on their development environment.

If this doesn't work, describe everything in detail! The more information you
provide the easier we can see what's going on.

Providing Samba log files

Post the output of 'rpm -qi samba' or 'rpm -qi samba-<subpackage>' if you're on
a RPM based system. It gives detailed information about the installed packages.
We need that information to reconstruct what happened and possibly to reproduce
the bug on our machines.

Always provide all log files from the '/var/log/samba/' directory and the
configuration file '/etc/samba/smb.conf'! If you see errors in tdb files make
sure you add the related tdb files from '/var/lib/samba'.

If winbind for logging in is part of the problem please provide
'/etc/security/pam_winbind.conf' and if you have enabled debug in
'pam_winbind.conf' '/var/log/messages' or '/var/log/secure' is required too.

More detailed description about different Samba components can be found below
this section.

Providing backtraces

If you discover a crash in one of the Samba components, please make sure that
you have installed debuginfo packages. Often the backtrace can be found in the
log files. If you have installed debuginfo packages, you can find a short
backtrace in the log files and a few lines later the full backtrace. Make sure
you provide the full backtrace.

Testing daemons (winbind, smb, nmb)

1. Stop all running Samba processes (winbind, smb, nmb)

2. Remove all log files from /var/log/samba/

    With this approach we ensure to have the start date of the testing in the
    log files.

3. Edit /etc/samba/smb.conf and set the following variables in the in the
   [general] section of the config:

     debug level = 10
     debug pid = true
     max log size = 0

    Instead of setting a global debug level in smb.conf it's also visible to

     smbcontrol <damon_name> debug 10

    to increase the debug level of the Samba daemon in question to 10 at run

    If winbind is part of the scenario edit /etc/security/pam_winbind.conf
    and set:

     debug = yes

4. Start the processes again (winbind, smb, nmb)

5. Reproduce the error and note the time when you start any test. If a problem
   occurs while testing note the time (use date on the system you perform the
   tests on to get a time fitting to the log files).

Attach the log files from '/var/log/samba/' and the tdb files from
'/var/lib/samba/' to the bug. If possible, remove the tdb files and provide clean
files. Therefore it's best to bond them to one compressed tar archive. The
relevant parts of '/var/log/messages' could be interesting too.

Network traces

If possible create network traces with tcpdump or wireshark from the problem and
attach them too. Always make sure to capture only one problem per network trace
file. This makes it easier to understand the problem.

tcpdump -n -i eth0 -s 0 -w samba-problem-description.pcap

Network topology

If you have a special network setup especially with Active Domain controllers
please describe how you're network looks like and what the domain names are.

Tell us which version of Windows you're using and which functional level of AD.
Comment 3 David Disseldorp 2013-01-18 15:58:55 UTC
(In reply to comment #1)
> Created attachment 7308 [details]
> Zipfile containing level 10 log

Thanks for the report Tom. Could you please attach the level 10 log to the bug directly. The URL provided is no longer reachable.