All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Razvan Cojocaru <rcojocaru@bitdefender.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: NULL pointer dereference at at libxlu_cfg.c:356
Date: Thu, 30 Apr 2015 01:57:27 +0100	[thread overview]
Message-ID: <20150430005727.GA13030@zion.uk.xensource.com> (raw)
In-Reply-To: <5540B1C2.9080702@bitdefender.com>

On Wed, Apr 29, 2015 at 01:26:10PM +0300, Razvan Cojocaru wrote:
> Hello,
> 
> This happens:
> 
> (gdb) r create /etc/xen/4xenwin7.conf
> Starting program: /usr/sbin/xl create /etc/xen/4xenwin7.conf
> warning: no loadable sections found in added symbol-file system-supplied
> DSO at 0x7ffff7ffa000
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> Parsing config from /etc/xen/4xenwin7.conf
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff7bce695 in xlu_cfg_get_listitem (list=0x633298, entry=0) at
> libxlu_cfg.c:356
> 356         if (list->values[entry]->type != XLU_STRING) return 0;
> (gdb) bt
> #0  0x00007ffff7bce695 in xlu_cfg_get_listitem (list=0x633298, entry=0)
> at libxlu_cfg.c:356
> #1  0x000000000040dc41 in parse_config_data
> (config_source=0x7fffffffe8af "/etc/xen/4xenwin7.conf",
>     config_data=0x632d60 "builder = 'hvm'\ndevice_model_version =
> 'qemu-xen-traditional'\npae = 1\nmemory = 1024\nmaxmem =
> 1024\nshadow_memory = 16\nname = '4xenwin7'\nvif = []\n#vif = [
> 'bridge=xenbr0' ]\n#vif = [ 'bridge=eth0' ]\nacpi"..., config_len=447,
> d_config=0x7fffffffdc60) at xl_cmdimpl.c:1814
> #2  0x0000000000410bc6 in create_domain (dom_info=0x7fffffffe080) at
> xl_cmdimpl.c:2646
> #3  0x0000000000417226 in main_create (argc=1, argv=0x7fffffffe678) at
> xl_cmdimpl.c:4866
> #4  0x00000000004083c3 in main (argc=2, argv=0x7fffffffe670) at xl.c:361
> (gdb) p list
> $1 = (const XLU_ConfigList *) 0x633298
> (gdb) p list->values[entry]
> $2 = (XLU_ConfigValue *) 0x0
> 
> when using this configuration file:
> 
> # cat /etc/xen/4xenwin7.conf
> builder = 'hvm'
> device_model_version = 'qemu-xen-traditional'
> pae = 1
> memory = 1024
> maxmem = 1024
> shadow_memory = 16
> name = '4xenwin7'
> vif = []
> #vif = [ 'bridge=xenbr0' ]
> acpi = 1
> apic = 1
> vcpus = 1
> disk = [ 'file:/root/4xenwin7.img,hda,w',
> 'file:/root/windows7.iso,hdc:cdrom,r' ]
> boot = 'c'
> sdl = 0
> nomigrate = 1
> vnc = 1
> vncconsole = 1
> vncpasswd = ''
> serial = 'pipe:/root/debug.pipe'
> usbdevice = 'tablet'
> 
> It always happens when I switch from vif = [ 'bridge=xenbr0' ] to vif =
> []. If I don't mention vif at all there's no crash.
> 
> This happens with Xen 4.6 (master, pulled today). I can submit a patch
> to check that list->values[entry] != NULL, but maybe the maintaners
> would prefer to go in a different direction with the fix.
> 

This is already fixed in staging by Jan. Check out his libxlu patch.

Wei.


> 
> HTH,
> Razvan

      parent reply	other threads:[~2015-04-30  0:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-29 10:26 NULL pointer dereference at at libxlu_cfg.c:356 Razvan Cojocaru
2015-04-29 10:32 ` Andrew Cooper
2015-04-29 10:35   ` Razvan Cojocaru
2015-04-30  0:57 ` Wei Liu [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=20150430005727.GA13030@zion.uk.xensource.com \
    --to=wei.liu2@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=rcojocaru@bitdefender.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.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.