[poppler] [PATCH] provide type-checking for union pointer accesses

Albert Astals Cid aacid at kde.org
Sun Apr 20 08:25:21 PDT 2008


A Dissabte 19 Abril 2008, Kees Cook va escriure:
> Hello!  This patch is based on some work[1] I did to make the poppler
> Object union member accesses safer in the future (to avoid things
> like CVE-2008-1693).  After some discussion on IRC, an improved way of
> handling things was resolved, which should not degrade performance in any
> noticeable way as the checks are memory-local to the union member being
> accessed, and can be hinted to be "unlikely" situations by the compiler.
>
> Please keep me in CC, as I'm on the list.

After applying your patch i did a bit of testing.

Using the time command to measure speeds i was not able to detect any speed 
change outside the typical variations between run and run.

Using cachegrind i saw your patch gives 0.69% more Instruction refs, 0.23% 
more Data refs but 3.78% less L2 refs. So it would seem it gives us a small 
speed boost as we are accessing L2 cache less than before :D

If noone complains i'll commit it by wednesday.

Thanks for the patch,
  Albert

>
> Thanks!
>
> -Kees
>





More information about the poppler mailing list