public inbox for gentoo-hardened@lists.gentoo.org
 help / color / mirror / Atom feed
From: Matthew Thode <mthode@mthode.org>
To: gentoo-hardened@lists.gentoo.org
Subject: Re: [gentoo-hardened] hardened-sources-2.6.36-r8
Date: Thu, 13 Jan 2011 15:10:09 -0500	[thread overview]
Message-ID: <AANLkTik-sVgzVJht4uqUs8nS1VNze3pS67OCoHQZMrp-@mail.gmail.com> (raw)
In-Reply-To: <a9a70859718d582c2f56af644427142f.squirrel@atoth.sote.hu>

[-- Attachment #1: Type: text/plain, Size: 2208 bytes --]

I had this issue with vanilla 2.6.32.27 patched with the 2.6.32.27 grsec
patch (2-3 days ago).

On Thu, Jan 13, 2011 at 14:38, "Tóth Attila" <atoth@atoth.sote.hu> wrote:

> Compiling the recent hardened-sources results in the following error
> message, when irda is enabled:
>
>  CC      net/irda/af_irda.o
> net/irda/af_irda.c: In function ‘__irda_getsockopt’:
> net/irda/af_irda.c:2289:4: error: label ‘out’ used but not defined
>
> The changes causing it introduced recently.
>
> --- linux-2.6.36-hardened-r7/net/irda/af_irda.c 2010-10-20
> 22:30:22.000000000 +0200
> +++ linux-2.6.36-hardened-r8/net/irda/af_irda.c 2011-01-13
> 13:08:57.000000000 +0100
> @@ -2278,6 +2278,17 @@
>
>        switch (optname) {
>        case IRLMP_ENUMDEVICES:
> +
> +
> +               /* Offset to first device entry */
> +               offset = sizeof(struct irda_device_list) -
> +                       sizeof(struct irda_device_info);
> +
> +               if (len < offset) {
> +                       err = -EINVAL;
> +                       goto out;
> +               }
> +
>                /* Ask lmp for the current discovery log */
>                discoveries = irlmp_get_discoveries(&list.len,
> self->mask.word,
>                                                    self->nslots);
> @@ -2287,15 +2298,9 @@
>                err = 0;
>
>                /* Write total list length back to client */
> -               if (copy_to_user(optval, &list,
> -                                sizeof(struct irda_device_list) -
> -                                sizeof(struct irda_device_info)))
> +               if (copy_to_user(optval, &list, offset))
>                        err = -EFAULT;
>
> -               /* Offset to first device entry */
> -               offset = sizeof(struct irda_device_list) -
> -                       sizeof(struct irda_device_info);
> -
>                /* Copy the list itself - watch for overflow */
>                if(list.len > 2048)
>                {
>
> What are your suggestions?
>
> Thx:
> Dw.
> --
> dr Tóth Attila, Radiológus, 06-20-825-8057
> Attila Toth MD, Radiologist, +36-20-825-8057
>
>
>

[-- Attachment #2: Type: text/html, Size: 2876 bytes --]

  parent reply	other threads:[~2011-01-13 21:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 19:38 [gentoo-hardened] hardened-sources-2.6.36-r8 "Tóth Attila"
2011-01-13 19:23 ` pageexec
2011-01-13 20:05 ` "Tóth Attila"
2011-01-13 20:10 ` Matthew Thode [this message]
2011-01-13 20:14   ` Matthew Thode

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=AANLkTik-sVgzVJht4uqUs8nS1VNze3pS67OCoHQZMrp-@mail.gmail.com \
    --to=mthode@mthode.org \
    --cc=gentoo-hardened@lists.gentoo.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox