ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: at@turbinal.org
To: sisyphus@altlinux.ru
Subject: Re: [sisyphus] Re: tcpdump
Date: Tue, 17 Sep 2002 01:42:38 +0400
Message-ID: <20020916214238.GA24382@homestead.turbinal.org> (raw)
In-Reply-To: <20020916205008.GO20694@osdn.org.ua>

On Mon, Sep 16, 2002 at 11:50:08PM +0300, Michael Shigorin wrote:
> On Tue, Sep 17, 2002 at 12:00:35AM +0400, at@turbinal.org wrote:
> > # tcpdump
> 
> -i?

А у вас всё нормально?

# tcpdump -i lo
tcpdump: Segmentation fault
#

Вопросец: есть какой-нибудь ключик к rpm, чтобы собирать -bi только с -g
и без стрипа? А то я типа спек правлю.

(gdb) r -i lo
Starting program: /var/tmp/tcpdump-buildroot/usr/sbin/tcpdump -i lo
tcpdump:
Program received signal SIGSEGV, Segmentation fault.
0x2abed3aa in vfprintf () from /lib/libc.so.6
(gdb) bt
#0  0x2abed3aa in vfprintf () from /lib/libc.so.6
#1  0x2abf1008 in vfprintf () from /lib/libc.so.6
#2  0x2abf09b4 in vfprintf () from /lib/libc.so.6
#3  0x08083d54 in error (fmt=0x1 <Address 0x1 out of bounds>) at util.c:252
#4  0x08084110 in drop_priv () at droppriv.c:25
#5  0x08083274 in main (argc=3, argv=0x7ffffac4) at tcpdump.c:481
#6  0x2abbf4d2 in __libc_start_main () from /lib/libc.so.6

(gdb) b drop_priv
Note: breakpoint 1 also set at pc 0x808409a.
Breakpoint 2 at 0x808409a: file droppriv.c, line 13.
(gdb) r -i lo
Starting program: /var/tmp/tcpdump-buildroot/usr/sbin/tcpdump -i lo
Breakpoint 1, drop_priv () at droppriv.c:13
13              const char *user = "tcpdump";
(gdb) n
14              const char *dir = "/var/resolv";
(gdb) n
17              if (geteuid ())
(gdb) n
20              if ((setgroups (0, NULL) < 0))
(gdb) n
23              pw = getpwnam (user);
(gdb) n
24              if (!pw)
(gdb) s
25                      error (EXIT_FAILURE, 0, "lookup of user \"%s\" failed", user);
(gdb) s
error (fmt=0x1 <Address 0x1 out of bounds>) at util.c:250
250             (void)fprintf(stderr, "%s: ", program_name);
(gdb) s
tcpdump: 251            va_start(ap, fmt);
(gdb) s
252             (void)vfprintf(stderr, fmt, ap);
(gdb) p fmt
$1 = 0x1 <Address 0x1 out of bounds>
(gdb) p ap
$2 = 0x7ffff8d4 ""
(gdb)

Короче смысл такой, что va_arg будет разматывать стек, которого нет.

$ grep 'error *(' tcpdump-*/*.h
tcpdump-3.7.1/interface.h:extern void error(const char *, ...)
$

Вывод: tcpdump битый.


  reply	other threads:[~2002-09-16 21:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-16 20:00 [sisyphus] tcpdump at
2002-09-16 20:50 ` [sisyphus] tcpdump Michael Shigorin
2002-09-16 21:42   ` at [this message]
2002-09-16 22:14     ` Michael Shigorin
2002-09-16 22:28       ` at
2002-09-16 22:56         ` Michael Shigorin
2002-09-17  7:56     ` Dmitry V. Levin
2002-09-17 12:15       ` Alexey Tourbin
2002-09-17 12:20         ` Dmitry V. Levin
2002-09-17 12:43           ` Alexey Tourbin
2002-09-20 13:17           ` at
2002-09-22 22:30           ` at
2002-09-23 13:06             ` [sisyphus] groups, users and specs (was: tcpdump) Michael Shigorin
2002-09-23 13:22               ` [sisyphus] " Alexey Tourbin
2002-09-23 14:08                 ` Michael Shigorin
2002-09-23 22:41                   ` at
2002-09-24  9:37                     ` Michael Shigorin
2002-09-22 22:14     ` [sisyphus] Re: tcpdump at
2002-09-23  8:04       ` Dmitry V. Levin

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=20020916214238.GA24382@homestead.turbinal.org \
    --to=at@turbinal.org \
    --cc=sisyphus@altlinux.ru \
    /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