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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 21 Aug 2010 12:56:13 +0300
From:	Artem Bityutskiy <dedekind1@...il.com>
To:	Don Mullis <don.mullis@...il.com>
Cc:	linux-kernel@...r.kernel.org, David Airlie <airlied@...ux.ie>,
	Dave Chinner <david@...morbit.com>
Subject: Re: [PATCH 0/6] improve list_sort test

On Sun, 2010-08-08 at 13:07 -0700, Don Mullis wrote:
> On Sun, Aug 8, 2010 at 12:31 PM, Don Mullis <don.mullis@...il.com> wrote:
> > Artem Bityutskiy <dedekind1@...il.com> writes:
> >> Actually, your 'list_sort()' version does have a problem. I found out
> >> that it calls 'cmp(priv, a, b)' with 'a = b' sometimes, and in these
> >> cases 'a' and 'b' can point to something which is not a valid element of
> >> the original list. Probably a senitel or something like that.
> 
> Looks like if the original list is a POT in length, the first callback
> from line 73 will pass a==b both pointing to the original list_head.
> Would you be able to test this fix?
> 
> --- linux-2.6.orig/lib/list_sort.c
> +++ linux-2.6/lib/list_sort.c
> @@ -70,7 +70,7 @@ static void merge_and_restore_back_links
>                  * element comparison is needed, so the client's cmp()
>                  * routine can invoke cond_resched() periodically.
>                  */
> -               (*cmp)(priv, tail, tail);
> +               (*cmp)(priv, tail->next, tail->next);

Ack, this fix works, thanks.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ