From: Alexander Bokovoy <ab@altlinux.org>
To: ALT Linux Sisyphus discussions <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] q: libusb error handling bug
Date: Tue, 18 Aug 2009 06:55:28 +0300
Message-ID: <6062a6e60908172055i516a5712q9a004bcb2c75acbb@mail.gmail.com> (raw)
In-Reply-To: <20090817210233.GE28137@wo.int.altlinux.org>
2009/8/18 Dmitry V. Levin <ldv@altlinux.org>:
> On Mon, Aug 17, 2009 at 08:49:09PM +0400, Dmitry V. Levin wrote:
>> On Sun, Aug 16, 2009 at 05:24:01PM +0300, Michael Shigorin wrote:
>> > Здравствуйте.
>> > Несколько ранее было обнаружено, что sispmctl сегфолтится
>> > при попытке работы с USB-устройством на 2.6.18-ovz-rhel-alt7:
>> >
>> > ---
>> > $ strace sispmctl -o 1
> [...]
>
> $ valgrind sispmctl -o 1
> [...]
> ==12345== Invalid read of size 4
> ==12345== at 0x5381B9F: usbi_log (core.c:1431)
> ==12345== by 0x538724D: sysfs_get_device_list (linux_usbfs.c:924)
> ==12345== by 0x5387379: op_get_device_list (linux_usbfs.c:963)
> ==12345== by 0x5380ADD: libusb_get_device_list (core.c:560)
> ==12345== by 0x4E29F27: usb_find_busses (in /lib64/libusb-0.1.so.4.4.4)
> ==12345== by 0x40185B: (within /usr/bin/sispmctl)
> ==12345== by 0x504B9DC: (below main) (in /lib64/libc-2.10.1.so)
> ==12345== Address 0x0 is not stack'd, malloc'd or (recently) free'd
> ==12345==
> ==12345== Process terminating with default action of signal 11 (SIGSEGV)
> ==12345== Access not within mapped region at address 0x0
> ==12345== at 0x5381B9F: usbi_log (core.c:1431)
> ==12345== by 0x538724D: sysfs_get_device_list (linux_usbfs.c:924)
> ==12345== by 0x5387379: op_get_device_list (linux_usbfs.c:963)
> ==12345== by 0x5380ADD: libusb_get_device_list (core.c:560)
> ==12345== by 0x4E29F27: usb_find_busses (in /lib64/libusb-0.1.so.4.4.4)
> ==12345== by 0x40185B: (within /usr/bin/sispmctl)
> ==12345== by 0x504B9DC: (below main) (in /lib64/libc-2.10.1.so)
>
> (gdb) bt
> #0 0x00002b7d2e6b2b9f in usbi_log (ctx=0x0, level=LOG_LEVEL_ERROR, function=0x2b7d2e6bb810 "sysfs_get_device_list",
> format=0x2b7d2e6bb1e0 "opendir devices failed errno=%d") at core.c:1431
> #1 0x00002b7d2e6b824e in sysfs_get_device_list (ctx=0x0, _discdevs=0x7fff7cb6b050, usbfs_fallback=0x7fff7cb6b00c)
> at os/linux_usbfs.c:924
> #2 0x00002b7d2e6b837a in op_get_device_list (ctx=0x0, _discdevs=0x7fff7cb6b050) at os/linux_usbfs.c:963
> #3 0x00002b7d2e6b1ade in libusb_get_device_list (ctx=0x0, list=0x7fff7cb6b098) at core.c:560
> #4 0x00002b7d2e15af28 in usb_find_busses () from /lib64/libusb-0.1.so.4
> #5 0x000000000040185c in ?? ()
> #6 0x00002b7d2e37c9dd in __libc_start_main () from /lib64/libc.so.6
>
> Это NULL dereference в usbi_log() из libusb.
> Вызов libusb_init() завершился неудачно, в результате чего
> usbi_default_context остался непроинициализированным.
> Остальной код libusb на это не рассчитывает.
>
> Короче говоря, надо исправить обработку ошибок в libusb.
Ok.
--
/ Alexander Bokovoy
next prev parent reply other threads:[~2009-08-18 3:55 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-16 14:24 [sisyphus] q: libusb{,-compat} и 2.6.18-ovz-rhel Michael Shigorin
2009-08-16 14:30 ` Valery V. Inozemtsev
2009-08-16 15:58 ` Valery V. Inozemtsev
2009-08-16 16:52 ` Dmitry V. Levin
2009-08-16 17:15 ` Valery V. Inozemtsev
2009-08-16 17:33 ` [sisyphus] klibc incompatibilities Dmitry V. Levin
2009-08-16 17:47 ` Valery V. Inozemtsev
2009-08-16 17:53 ` Valery V. Inozemtsev
2009-08-16 23:27 ` Dmitry V. Levin
2009-08-16 20:15 ` Dmitry V. Levin
2009-08-17 5:39 ` Valery V. Inozemtsev
2009-08-16 16:54 ` [sisyphus] q: libusb{,-compat} и 2.6.18-ovz-rhel Dmitry V. Levin
2009-08-16 17:17 ` Valery V. Inozemtsev
2009-08-16 18:20 ` Michael Shigorin
2009-08-16 18:30 ` Valery V. Inozemtsev
2009-08-16 18:33 ` Michael Shigorin
2009-08-16 21:36 ` Alexey Borovskoy
2009-08-17 17:05 ` Valery V. Inozemtsev
2009-08-17 17:17 ` Michael Shigorin
2009-08-17 15:56 ` Michael Shigorin
2009-08-17 16:21 ` Alexander Bokovoy
2009-08-17 16:47 ` Michael Shigorin
2009-08-17 16:48 ` Valery V. Inozemtsev
2009-08-17 16:49 ` Dmitry V. Levin
2009-08-17 16:52 ` Michael Shigorin
2009-08-17 16:56 ` Valery V. Inozemtsev
2009-08-17 21:02 ` [sisyphus] q: libusb error handling bug Dmitry V. Levin
2009-08-18 3:55 ` Alexander Bokovoy [this message]
2009-08-18 7:13 ` Michael Shigorin
2009-08-18 8:54 ` Alexander Bokovoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6062a6e60908172055i516a5712q9a004bcb2c75acbb@mail.gmail.com \
--to=ab@altlinux.org \
--cc=sisyphus@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git