Brother printers do not accept changes to default printer settings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
brother-cups-wrapper-common (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: brother-
When printing a document there are device driver options that can be set via dialog windows such as whether to print in color/grayscale or the media size.
These options are passed from CUPS to a script appropriate for the specific Brother printer in /usr/lib/
This C executable is badly written and is subject to buffer overflows if the length of the printer arguments passed to it is greater than 100. Thanks to gcc, most applications under Debian are compiled with stack smashing protection. This means the application silently dies without harm, but the printer options specified are not applied since the executable died before completion.
Ideally, Brother would write better device drivers without buffer overflow opportunities. In reality, I don't think they will get around to changing this anytime soon.
I have attached a patch which increases the size of the input buffer. It compiles and resolves the issue for me. The code is available from the Brother website and is licensed under the GPL. This modification should therefore be usable by Ubuntu.
ProblemType: Bug
Architecture: i386
Date: Thu Mar 11 20:32:50 2010
DistroRelease: Ubuntu 9.10
Package: brother-
ProcEnviron:
LANGUAGE=en_US:en
LANG=en_US.UTF-8
SHELL=/bin/tcsh
ProcVersionSign
SourcePackage: brother-
Uname: Linux 2.6.31-20-generic i686
tags: | added: patch |
This second patch is more robust than the first one. It uses strncpy rather than strcpy to guarantee that the program doesn't copy more bytes into a buffer than it has room for.