lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Jul 2008 15:53:54 -0700
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Johannes Berg <johannes@...solutions.net>
Cc:	Andreas Henriksson <andreas@...al.se>,
	stephen.hemminger@...tta.com, 489340@...s.debian.org,
	netdev@...r.kernel.org
Subject: Re: iproute2: no error message when link up command fails.

On Thu, 17 Jul 2008 00:35:22 +0200
Johannes Berg <johannes@...solutions.net> wrote:

> 
> > > (By the way, most uses of rtnl_* seems to be if (rtnl_* < 0) exit(1); in
> > > iproute2 currently. The error messages are in libnetlink.)
> 
> > The problem is the driver is responding with an error packet but the
> > errno is 0. This looks like a kernel bug, not an library bug.
> 
> I don't think so, the recvmsg() call worked fine, but the message
> indicates that the netlink consumer had an error. Or am I missing
> something?
> 
> johannes

The netlink message in question is marked as type ERROR but the errno
encoded in the message is zero.

		if (h->nlmsg_type == NLMSG_ERROR) {
			struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(h);
			if (l < sizeof(struct nlmsgerr)) {
				fprintf(stderr, "ERROR truncated\n");
			} else {
				errno = -err->error;
				if (errno == 0) {
					if (answer)
						memcpy(answer, h, h->nlmsg_len);
					return 0;
				}
				perror("RTNETLINK answers");
			}

So the netlink library just treats as a successful return.
To me it looks like the problem is in the kernel sending back
a NLMSG_ERROR with errno of zero. Some code path isn't setting
it up properly.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ