From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PdUJl-00031G-LC for garchives@archives.gentoo.org; Thu, 13 Jan 2011 21:02:53 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4A632E0803 for ; Thu, 13 Jan 2011 21:02:49 +0000 (UTC) Received: from atoth.sote.hu (atoth.sote.hu [195.111.75.211]) by pigeon.gentoo.org (Postfix) with ESMTP id 10A51E065E for ; Thu, 13 Jan 2011 20:05:58 +0000 (UTC) Received: from atoth.sote.hu (apache@localhost [127.0.0.1]) by atoth.sote.hu (8.14.4/8.14.4/atoth@atoth.sote.hu) with ESMTP id p0DK5tPa023696 for ; Thu, 13 Jan 2011 21:05:55 +0100 X-DKIM: Sendmail DKIM Filter v2.8.3 atoth.sote.hu p0DK5tPa023696 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atoth.sote.hu; s=dwokfur; t=1294949158; bh=zspJl9exdFfhZocciBdHqPMoPGj2DfbCzuQzeUHE86M=; l=2279; h=Message-ID:In-Reply-To:References:Date:Subject:From:To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=mqFZSvbgx+ToPZBhRM3c8kT9EUg0Yp1XXG/ZVgIZd3bIErm4tvQ08vC9FOQe78Y4A rg9Z8jDzzaLNnk96GBN2KptI2QTqobkZ6T1RUjqKAz5zxqRUPAKe4+MxXeu8CWDVD2 gRw0OOG7jY3okRQ45HpLxtovqvDsNu0haSmiQ9ME= X-DomainKeys: Sendmail DomainKeys Filter v1.0.2 atoth.sote.hu p0DK5tPa023696 DomainKey-Signature: a=rsa-sha1; s=dwokfur; d=atoth.sote.hu; c=nofws; q=dns; h=x-virus-status:x-virus-scanned:received:message-id: in-reply-to:references:date:subject:from:to:user-agent:mime-version: content-type:content-transfer-encoding:x-priority:importance: x-spam-status:x-spam-checker-version:x-list-milter:x-dcc-stat_fi_x86_64_virtual-metrics; b=FK7lfkQAP5ocVtpU803ywQ6uhZ7nISdXwpB4t6RzlDczvyrkGhOUSrfq9XTFHAyaR J6JYtTCkAfGJKB1gLlqsjMzzSSAJaBw9D3HiUkCSQ1fgomMCxGB2gu/QsMzxe7JuMtV n94x2+5k2rAmNwq2Dj0YFfNT/Q+R99ZyhH2tIDg= X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.96.5 at atoth Received: from 10.97.100.79 (SquirrelMail authenticated user atoth) by atoth.sote.hu with HTTP; Thu, 13 Jan 2011 21:05:55 +0100 Message-ID: <2eb4c10ba24d0281867b9a01958d8433.squirrel@atoth.sote.hu> In-Reply-To: References: Date: Thu, 13 Jan 2011 21:05:55 +0100 Subject: Re: [gentoo-hardened] hardened-sources-2.6.36-r8 From: =?utf-8?B?IlTDs3RoIEF0dGlsYSI=?= To: gentoo-hardened@lists.gentoo.org User-Agent: SquirrelMail/1.4.21 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-hardened@lists.gentoo.org Reply-to: gentoo-hardened@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 X-Priority: 3 (Normal) Importance: Normal X-Spam-Status: No, score=-99.8 required=5.0 tests=ALL_TRUSTED,AWL, DKIM_ADSP_ALL,USER_IN_WHITELIST autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on atoth.sote.hu X-List-Milter: local mail X-DCC-STAT_FI_X86_64_VIRTUAL-Metrics: atoth; whitelist Content-Transfer-Encoding: quoted-printable X-Archives-Salt: dd6dfae9-13c9-4418-8fad-37146d403ca4 X-Archives-Hash: 502cdeb48c62932a2099b2a00553b1fb What about this one? --- af_irda.c 2011-01-13 20:41:26.000000000 +0100 +++ af_irda-dwokfur.c 2011-01-13 20:41:50.000000000 +0100 @@ -2286,7 +2286,7 @@ if (len < offset) { err =3D -EINVAL; - goto out; + goto bed; } /* Ask lmp for the current discovery log */ It still complains: net/irda/af_irda.c: In function =E2=80=98irda_getsockopt=E2=80=99: net/irda/af_irda.c:2258:27: warning: =E2=80=98discoveries=E2=80=99 may be= used uninitialized in this function net/irda/af_irda.c:2258:27: note: =E2=80=98discoveries=E2=80=99 was decla= red here Regards: Dw. --=20 dr T=C3=B3th Attila, Radiol=C3=B3gus, 06-20-825-8057 Attila Toth MD, Radiologist, +36-20-825-8057 2011.Janu=C3=A1r 13.(Cs) 20:38 id=C5=91pontban "T=C3=B3th Attila" ezt =C3= =ADrta: > 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 =E2=80=98__irda_getsockopt=E2=80=99: > net/irda/af_irda.c:2289:4: error: label =E2=80=98out=E2=80=99 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 =3D sizeof(struct irda_device_list) - > + sizeof(struct irda_device_info); > + > + if (len < offset) { > + err =3D -EINVAL; > + goto out; > + } > + > /* Ask lmp for the current discovery log */ > discoveries =3D irlmp_get_discoveries(&list.len, > self->mask.word, > self->nslots); > @@ -2287,15 +2298,9 @@ > err =3D 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 =3D -EFAULT; > > - /* Offset to first device entry */ > - offset =3D 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=C3=B3th Attila, Radiol=C3=B3gus, 06-20-825-8057 > Attila Toth MD, Radiologist, +36-20-825-8057 > > >