On Wednesday 24 February 2010 11:52:37 am Joshua Roys wrote: > This fixes corrupted CIPSO packets when SELinux categories greater > than 127 are used. The bug occured on the second (and later) loops > through the while; the inner for loop through the ebitmap->maps array > used the same index as the NetLabel catmap->bitmap array, even though > the NetLabel bitmap is twice as long as the SELinux bitmap. > > Signed-off-by: Joshua Roys <joshua.roys@xxxxxxxxxxxxxxx> Ha! I came to the same conclusion and sent you a similar patch a few hours ago (should have checked my SELinux email folder first it seems). Acked-by: Paul Moore <paul.moore@xxxxxx> This should also be sent to stable - James or Josh do one of you guys want to do that? > --- > security/selinux/ss/ebitmap.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c > index 68c7348..04b6145 100644 > --- a/security/selinux/ss/ebitmap.c > +++ b/security/selinux/ss/ebitmap.c > @@ -128,7 +128,7 @@ int ebitmap_netlbl_export(struct ebitmap *ebmap, > cmap_idx = delta / NETLBL_CATMAP_MAPSIZE; > cmap_sft = delta % NETLBL_CATMAP_MAPSIZE; > c_iter->bitmap[cmap_idx] > - |= e_iter->maps[cmap_idx] << cmap_sft; > + |= e_iter->maps[i] << cmap_sft; > } > e_iter = e_iter->next; > } -- paul moore linux @ hp -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with the words "unsubscribe selinux" without quotes as the message.