SCM

[#315760] Mustek libsane-mustek_usb2 crashing with stack smashing detected

View Trackers | Bugs | Export CSV

Date:
2017-06-20 19:40
Priority:
3
State:
Open
Submitted by:
Chris Severance (severach-guest)
Assigned to:
Nobody (None)
Category:
backends (drivers)
Group:
None
Resolution:
None
Summary:
Mustek libsane-mustek_usb2 crashing with stack smashing detected

Detailed description
$ scanimage -L
device `mustek_usb2:libusb:002:007' is a Mustek BearPaw 2448 TA Pro flatbed scanner

$ scanimage --format=png > 111.png
*** stack smashing detected ***: scanimage terminated
======= Backtrace: =========
/usr/lib/libc.so.6(+0x7254c)[0x7fbf0d33454c]
/usr/lib/libc.so.6(__fortify_fail+0x37)[0x7fbf0d3c0377]
/usr/lib/libc.so.6(__fortify_fail+0x0)[0x7fbf0d3c0340]
/usr/lib/sane/libsane-mustek_usb2.so.1(+0xf71c)[0x7fbf05f7771c]
/usr/lib/sane/libsane-mustek_usb2.so.1(+0x1242c)[0x7fbf05f7a42c]
/usr/lib/sane/libsane-mustek_usb2.so.1(+0x14dc0)[0x7fbf05f7cdc0]
/usr/lib/sane/libsane-mustek_usb2.so.1(sane_mustek_usb2_open+0x2e2)[0x7fbf05f7fbc2]
/usr/lib/libsane.so.1(sane_dll_open+0x129)[0x7fbf0db256e9]
scanimage[0x4021e7]
/usr/lib/libc.so.6(__libc_start_main+0xea)[0x7fbf0d2e243a]
scanimage[0x4046ca]

https://bbs.archlinux.org/viewtopic.php?pid=1719331

Followups: Sort comments antichronologically

Message
Date: 2017-06-21 13:00
Sender: Olaf Meeuwissen

What version of libsane are you using?

We removed a huge pile of compiler warnings in 1.0.27. You might want to try that if not using it already.
Date: 2017-06-21 15:46
Sender: Chris Severance

% scanimage --version
scanimage (sane-backends) 1.0.27; backend version 1.0.27

This is a long time bug. It only showed up because Arch recently enabled stack smashing protection in glibc. Compiling glibc without the protection would allow the Mustek driver to tolerate the bug.
Date: 2017-07-01 08:53
Sender: Olaf Meeuwissen

Thanks for the feedback.

I've tried finding what might be causing this but got lost in the backend's code (I'm not familiar with it). A debug log might help narrow the search scope down a bit. Could you (or the original poster on the Arch Linux BBS) provide the stack-smash.log produced by

SANE_DEBUG_MUSTEK_USB2=10 scanimage > /dev/null 2> stack-smash.log
Date: 2017-07-02 12:44
Sender: idiot ebrilo

Here comes the stack smash log

[sanei_debug] Setting debug level of mustek_usb2 to 10.
[mustek_usb2] sane_init: start
[mustek_usb2] SANE Mustek USB2 backend version 1.0 build 10 from sane-backends 1.0.27
[mustek_usb2] sane_init: authorize != null
[mustek_usb2] sane_init: exit
[mustek_usb2] sane_get_devices: start: local_only = false
[mustek_usb2] GetDeviceStatus: start
[mustek_usb2] Asic_Open: Enter
[mustek_usb2] attach_one_scanner: enter
[mustek_usb2] attach_one_scanner: devname = libusb:002:006
[mustek_usb2] OpenScanChip:Enter
[mustek_usb2] OpenScanChip: Exit
[mustek_usb2] Mustek_SendData: Enter. reg=94,data=27
[mustek_usb2] RegisterBankStatus=255
[mustek_usb2] RegisterBankStatus=0
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=79,data=60
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=f1
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=a5
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=91
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=81
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=f0
[mustek_usb2] Asic_WaitUnitReady:Enter
[mustek_usb2] GetChipStatus:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=8b,data=1
[mustek_usb2] Mustek_WriteAddressLineForRegister: Enter
[mustek_usb2] Mustek_WriteAddressLineForRegister: Exit
[mustek_usb2] Mustek_ReceiveData
[mustek_usb2] GetChipStatus:Exit
[mustek_usb2] Wait 0 s
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady: Exit
[mustek_usb2] Asic_WaitUnitReady
[mustek_usb2] SafeInitialChip:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=f3,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady:Enter
[mustek_usb2] GetChipStatus:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=8b,data=1
[mustek_usb2] Mustek_WriteAddressLineForRegister: Enter
[mustek_usb2] Mustek_WriteAddressLineForRegister: Exit
[mustek_usb2] Mustek_ReceiveData
[mustek_usb2] GetChipStatus:Exit
[mustek_usb2] Wait 0 s
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady: Exit
[mustek_usb2] isFirstOpenChip=0
[mustek_usb2] SafeInitialChip: exit
[mustek_usb2] Asic_Open: device libusb:002:006 successfully opened
[mustek_usb2] Asic_Open: Exit
[mustek_usb2] Asic_Close: Enter
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=1
[mustek_usb2] CloseScanChip:Enter
[mustek_usb2] CloseScanChip: Exit
[mustek_usb2] Asic_Close: Exit
[mustek_usb2] sane_get_devices: exit
[mustek_usb2] sane_open: start :devicename = libusb:002:006
[mustek_usb2] MustScanner_Init: Call in
[mustek_usb2] Asic_Open: Enter
[mustek_usb2] attach_one_scanner: enter
[mustek_usb2] attach_one_scanner: devname = libusb:002:006
[mustek_usb2] OpenScanChip:Enter
[mustek_usb2] OpenScanChip: Exit
[mustek_usb2] Mustek_SendData: Enter. reg=94,data=27
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=79,data=60
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=f1
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=a5
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=91
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=81
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=f0
[mustek_usb2] Asic_WaitUnitReady:Enter
[mustek_usb2] GetChipStatus:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=8b,data=1
[mustek_usb2] Mustek_WriteAddressLineForRegister: Enter
[mustek_usb2] Mustek_WriteAddressLineForRegister: Exit
[mustek_usb2] Mustek_ReceiveData
[mustek_usb2] GetChipStatus:Exit
[mustek_usb2] Wait 0 s
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady: Exit
[mustek_usb2] Asic_WaitUnitReady
[mustek_usb2] SafeInitialChip:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=f3,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady:Enter
[mustek_usb2] GetChipStatus:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=8b,data=1
[mustek_usb2] Mustek_WriteAddressLineForRegister: Enter
[mustek_usb2] Mustek_WriteAddressLineForRegister: Exit
[mustek_usb2] Mustek_ReceiveData
[mustek_usb2] GetChipStatus:Exit
[mustek_usb2] Wait 0 s
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady: Exit
[mustek_usb2] isFirstOpenChip=0
[mustek_usb2] SafeInitialChip: exit
[mustek_usb2] Asic_Open: device libusb:002:006 successfully opened
[mustek_usb2] Asic_Open: Exit
[mustek_usb2] Asic_Initialize:Enter
[mustek_usb2] isFirstOpenChip=0
[mustek_usb2] isFirstOpenChip=1
[mustek_usb2] Asic_Reset: Enter
[mustek_usb2] Asic_Reset: Exit
[mustek_usb2] InitTiming:Enter
[mustek_usb2] InitTiming:Exit
[mustek_usb2] Asic_Initialize: Exit
[mustek_usb2] Asic_Close: Enter
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=1
[mustek_usb2] CloseScanChip:Enter
[mustek_usb2] CloseScanChip: Exit
[mustek_usb2] Asic_Close: Exit
[mustek_usb2] MustScanner_Init: leave MustScanner_Init
[mustek_usb2] PowerControl: start
[mustek_usb2] MustScanner_PowerControl: Call in
[mustek_usb2] Asic_Open: Enter
[mustek_usb2] attach_one_scanner: enter
[mustek_usb2] attach_one_scanner: devname = libusb:002:006
[mustek_usb2] OpenScanChip:Enter
[mustek_usb2] OpenScanChip: Exit
[mustek_usb2] Mustek_SendData: Enter. reg=94,data=27
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=79,data=60
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=f1
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=a5
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=91
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=81
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=f0
[mustek_usb2] Asic_WaitUnitReady:Enter
[mustek_usb2] GetChipStatus:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=8b,data=1
[mustek_usb2] Mustek_WriteAddressLineForRegister: Enter
[mustek_usb2] Mustek_WriteAddressLineForRegister: Exit
[mustek_usb2] Mustek_ReceiveData
[mustek_usb2] GetChipStatus:Exit
[mustek_usb2] Wait 0 s
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady: Exit
[mustek_usb2] Asic_WaitUnitReady
[mustek_usb2] SafeInitialChip:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=f3,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady:Enter
[mustek_usb2] GetChipStatus:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=8b,data=1
[mustek_usb2] Mustek_WriteAddressLineForRegister: Enter
[mustek_usb2] Mustek_WriteAddressLineForRegister: Exit
[mustek_usb2] Mustek_ReceiveData
[mustek_usb2] GetChipStatus:Exit
[mustek_usb2] Wait 0 s
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady: Exit
[mustek_usb2] isFirstOpenChip=1
[mustek_usb2] isFirstOpenChip=1
[mustek_usb2] DRAM_Test:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=a0,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=a1,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=a2,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=79,data=60
[mustek_usb2] Mustek_SendData: Enter. reg=a3,data=ff
[mustek_usb2] Mustek_SendData: Enter. reg=a4,data=ff
[mustek_usb2] Mustek_SendData: Enter. reg=a5,data=ff
[mustek_usb2] Mustek_DMAWrite: Enter:size=64
[mustek_usb2] Mustek_ClearFIFO:Enter
[mustek_usb2] Mustek_ClearFIFO:Exit
[mustek_usb2] SetRWSize: Enter
[mustek_usb2] Mustek_SendData: Enter. reg=7c,data=40
[mustek_usb2] Mustek_SendData: Enter. reg=7d,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=7e,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=7f,data=0
[mustek_usb2] SetRWSize: Exit
[mustek_usb2] Mustek_ClearFIFO:Enter
[mustek_usb2] Mustek_ClearFIFO:Exit
[mustek_usb2] Mustek_DMAWrite: Exit
Date: 2017-07-08 05:36
Sender: Olaf Meeuwissen

Many thanks!

I think I found what is causing the trouble. Could you check if the attached patch fixes things for you?
Date: 2017-09-04 12:54
Sender: Roman Gorelov

Hi!

I have tried 0001-mustek_usb2-Fix-stack-smashing-error.patch on 1.0.27, but it doesn't help.

[sanei_debug] Setting debug level of mustek_usb2 to 10.
[mustek_usb2] sane_init: start
[mustek_usb2] SANE Mustek USB2 backend version 1.0 build 10 from sane-backends 1.0.25
[mustek_usb2] sane_init: authorize != null
[mustek_usb2] sane_init: exit
[mustek_usb2] sane_get_devices: start: local_only = false
[mustek_usb2] GetDeviceStatus: start
[mustek_usb2] Asic_Open: Enter
[mustek_usb2] attach_one_scanner: enter
[mustek_usb2] attach_one_scanner: devname = libusb:003:005
[mustek_usb2] OpenScanChip:Enter
[mustek_usb2] OpenScanChip: Exit
[mustek_usb2] Mustek_SendData: Enter. reg=94,data=27
[mustek_usb2] RegisterBankStatus=255
[mustek_usb2] RegisterBankStatus=0
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=79,data=60
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=f1
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=a5
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=91
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=81
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=f0
[mustek_usb2] Asic_WaitUnitReady:Enter
[mustek_usb2] GetChipStatus:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=8b,data=1
[mustek_usb2] Mustek_WriteAddressLineForRegister: Enter
[mustek_usb2] Mustek_WriteAddressLineForRegister: Exit
[mustek_usb2] Mustek_ReceiveData
[mustek_usb2] GetChipStatus:Exit
[mustek_usb2] Wait 0 s
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady: Exit
[mustek_usb2] Asic_WaitUnitReady
[mustek_usb2] SafeInitialChip:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=f3,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady:Enter
[mustek_usb2] GetChipStatus:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=8b,data=1
[mustek_usb2] Mustek_WriteAddressLineForRegister: Enter
[mustek_usb2] Mustek_WriteAddressLineForRegister: Exit
[mustek_usb2] Mustek_ReceiveData
[mustek_usb2] GetChipStatus:Exit
[mustek_usb2] Wait 0 s
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady: Exit
[mustek_usb2] isFirstOpenChip=0
[mustek_usb2] SafeInitialChip: exit
[mustek_usb2] Asic_Open: device libusb:003:005 successfully opened
[mustek_usb2] Asic_Open: Exit
[mustek_usb2] Asic_Close: Enter
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=1
[mustek_usb2] CloseScanChip:Enter
[mustek_usb2] CloseScanChip: Exit
[mustek_usb2] Asic_Close: Exit
[mustek_usb2] sane_get_devices: exit
[mustek_usb2] sane_open: start :devicename = libusb:003:005
[mustek_usb2] MustScanner_Init: Call in
[mustek_usb2] Asic_Open: Enter
[mustek_usb2] attach_one_scanner: enter
[mustek_usb2] attach_one_scanner: devname = libusb:003:005
[mustek_usb2] OpenScanChip:Enter
[mustek_usb2] OpenScanChip: Exit
[mustek_usb2] Mustek_SendData: Enter. reg=94,data=27
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=79,data=60
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=f1
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=a5
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=91
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=81
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=f0
[mustek_usb2] Asic_WaitUnitReady:Enter
[mustek_usb2] GetChipStatus:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=8b,data=1
[mustek_usb2] Mustek_WriteAddressLineForRegister: Enter
[mustek_usb2] Mustek_WriteAddressLineForRegister: Exit
[mustek_usb2] Mustek_ReceiveData
[mustek_usb2] GetChipStatus:Exit
[mustek_usb2] Wait 0 s
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady: Exit
[mustek_usb2] Asic_WaitUnitReady
[mustek_usb2] SafeInitialChip:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=f3,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady:Enter
[mustek_usb2] GetChipStatus:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=8b,data=1
[mustek_usb2] Mustek_WriteAddressLineForRegister: Enter
[mustek_usb2] Mustek_WriteAddressLineForRegister: Exit
[mustek_usb2] Mustek_ReceiveData
[mustek_usb2] GetChipStatus:Exit
[mustek_usb2] Wait 0 s
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady: Exit
[mustek_usb2] isFirstOpenChip=0
[mustek_usb2] SafeInitialChip: exit
[mustek_usb2] Asic_Open: device libusb:003:005 successfully opened
[mustek_usb2] Asic_Open: Exit
[mustek_usb2] Asic_Initialize:Enter
[mustek_usb2] isFirstOpenChip=0
[mustek_usb2] isFirstOpenChip=1
[mustek_usb2] Asic_Reset: Enter
[mustek_usb2] Asic_Reset: Exit
[mustek_usb2] InitTiming:Enter
[mustek_usb2] InitTiming:Exit
[mustek_usb2] Asic_Initialize: Exit
[mustek_usb2] Asic_Close: Enter
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=1
[mustek_usb2] CloseScanChip:Enter
[mustek_usb2] CloseScanChip: Exit
[mustek_usb2] Asic_Close: Exit
[mustek_usb2] MustScanner_Init: leave MustScanner_Init
[mustek_usb2] PowerControl: start
[mustek_usb2] MustScanner_PowerControl: Call in
[mustek_usb2] Asic_Open: Enter
[mustek_usb2] attach_one_scanner: enter
[mustek_usb2] attach_one_scanner: devname = libusb:003:005
[mustek_usb2] OpenScanChip:Enter
[mustek_usb2] OpenScanChip: Exit
[mustek_usb2] Mustek_SendData: Enter. reg=94,data=27
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=79,data=60
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=f1
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=a5
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=91
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=81
[mustek_usb2] Mustek_SendData: Enter. reg=87,data=f0
[mustek_usb2] Asic_WaitUnitReady:Enter
[mustek_usb2] GetChipStatus:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=8b,data=1
[mustek_usb2] Mustek_WriteAddressLineForRegister: Enter
[mustek_usb2] Mustek_WriteAddressLineForRegister: Exit
[mustek_usb2] Mustek_ReceiveData
[mustek_usb2] GetChipStatus:Exit
[mustek_usb2] Wait 0 s
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady: Exit
[mustek_usb2] Asic_WaitUnitReady
[mustek_usb2] SafeInitialChip:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=f3,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=86,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady:Enter
[mustek_usb2] GetChipStatus:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=8b,data=1
[mustek_usb2] Mustek_WriteAddressLineForRegister: Enter
[mustek_usb2] Mustek_WriteAddressLineForRegister: Exit
[mustek_usb2] Mustek_ReceiveData
[mustek_usb2] GetChipStatus:Exit
[mustek_usb2] Wait 0 s
[mustek_usb2] Mustek_SendData: Enter. reg=f4,data=0
[mustek_usb2] Asic_WaitUnitReady: Exit
[mustek_usb2] isFirstOpenChip=1
[mustek_usb2] isFirstOpenChip=1
[mustek_usb2] DRAM_Test:Enter
[mustek_usb2] Mustek_SendData: Enter. reg=a0,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=a1,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=a2,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=79,data=60
[mustek_usb2] Mustek_SendData: Enter. reg=a3,data=ff
[mustek_usb2] Mustek_SendData: Enter. reg=a4,data=ff
[mustek_usb2] Mustek_SendData: Enter. reg=a5,data=ff
[mustek_usb2] Mustek_DMAWrite: Enter:size=64
[mustek_usb2] Mustek_ClearFIFO:Enter
[mustek_usb2] Mustek_ClearFIFO:Exit
[mustek_usb2] SetRWSize: Enter
[mustek_usb2] Mustek_SendData: Enter. reg=7c,data=40
[mustek_usb2] Mustek_SendData: Enter. reg=7d,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=7e,data=0
[mustek_usb2] Mustek_SendData: Enter. reg=7f,data=0
[mustek_usb2] SetRWSize: Exit
[mustek_usb2] Mustek_ClearFIFO:Enter
[mustek_usb2] Mustek_ClearFIFO:Exit
[mustek_usb2] Mustek_DMAWrite: Exit
Date: 2017-09-10 03:11
Sender: Olaf Meeuwissen

Thanks for the feedback. Bummer my patch doesn't fix the issue. No clue then what might be triggering this. Suggestions/patches welcome.
Date: 2017-09-10 18:16
Sender: Roman Gorelov

Hi! I found out that I built 1.0.25. Now I'd like to try 1.0.27, but I have a trouble building it. I cannot get libusb support enabled. If I type either
BACKENDS=mustek_usb2 ./configure --enable-libusb
or
BACKENDS=mustek_usb2 ./configure --enable-libusb_1_0
it answers
configure: WARNING: unrecognized options: --enable-libusb
or
configure: WARNING: unrecognized options: --enable-libusb_1_0
Later if I run `sane-find-scanner -v` it says beyond lines
libusb not available
I am running Debian 9.1, and I have all kinds of packages installed: libusb-0.1-4 libusb-1.0-0 libusb-1.0-0-dev libusb-dev.
The "scanner" kernel module is unloaded.
What am I doing wrong?
Date: 2017-11-18 03:15
Sender: Olaf Meeuwissen

You forgot to read the NEWS file ;-)

Quoting:

Note 2: On all systems, the --enable-libusb* flags are now ignored.
Instead, the --with-usb and --without-usb flags now control support.
When neither is given, USB support will be enabled if possible and
disabled otherwise. If --with-usb is requested but not possible,
./configure will fail. There is no support to prefer libusb-0.1 over
libusb-1.0. When libusb-1.0 is not found, libusb-0.1 will be tried.

Sorry for the late follow-up.
Date: 2018-02-15 02:37
Sender: Roman Gorelov

Well... How does one fix that kind of a bug? Where to look at? How to work it around temporarily?
Date: 2018-03-11 18:22
Sender: Martin MareŇ°

I have a similar problem with mustek_usb2 and your patch helps.

Attached Files:

Attachments:
Size Name Date By Download
3 KiB0001-mustek_usb2-Fix-stack-smashing-error.patch2017-07-08 05:36olaf-guest0001-mustek_usb2-Fix-stack-smashing-error.patch

Changes:

Field Old Value Date By
assigned_toolaf-guest2017-09-10 03:11olaf-guest
File Added7518: 0001-mustek_usb2-Fix-stack-smashing-error.patch2017-07-08 05:36olaf-guest
assigned_tonone2017-07-01 08:53olaf-guest
Powered By FusionForge