Bug#902396: [nvram-wakeup] segfault with config generated by guess-helper
kardan
kardan at riseup.net
Tue Jun 26 01:07:52 BST 2018
Package: nvram-wakeup
Version: 1.1-4+b1
Severity: normal
On first run as root:
nvram-wakeup: Your mainboard is currently not supported.
nvram-wakeup: Please try determining the addresses and sending the
following nvram-wakeup: information back to the maintainers:
nvram-wakeup: - The addresses you found out (read README.mb)
nvram-wakeup: - Mainboard vendor: "ASUSTeK Computer INC."
nvram-wakeup: - Mainboard type: "M2NS-NVM"
nvram-wakeup: - Mainboard revision: "1.XX"
nvram-wakeup: - BIOS vendor: "Phoenix Technologies, LTD"
nvram-wakeup: - BIOS version: "M2NS-NVM 0103"
nvram-wakeup: - BIOS release: "08/31/2006"
Following instructions of /usr/share/doc/nvram-wakeup/README.mb.gz
I ran guess-helper which generated
attached /root/guess-directisa/nvram-wakeup.conf, after copying it
to /etc:
# nvram-wakeup -A -C /etc/nvram-wakeup.conf -s $((`date +%s` + 60))
Speicherzugriffsfehler
-A was used because the config contains "upper_method = VT82Cxxx" and
'man nvram-wakeup' suggests
-A, --directisa
Use direct I/O port access to access the nvram instead
of /dev/nvram. This option must be used if the configuration
option upper_method is set. The device /dev/rtc is still used.
WARNING: If you use the option --directisa and some other
programm tries to access nvram and/or rtc at the same
time, you might screw up all your nvram (i.e. all CMOS
settings).
Note that the segfault also happens without the -A flag.
I attached gdb.txt created with following command:
echo -e "set logging on\n run\n bt full" | gdb --args \
nvram-wakeup -D -A -C /etc/nvram-wakeup.conf -s $((`date +%s` + 60))
After adding # before each line of nvram-wakeup.conf I got:
# nvram-wakeup -A -s $((`date +%s` + 60)) -C /etc/nvram-wakeup2.conf
nvram-wakeup: addr_stat (0xFFFFFFFF) is beyond the end of nvram
Although the upstream project tracker looks a bit dead I have good
faith that this bugreport will help to both fix this nice tool and
to support above mainboard in the future.
(I did not register at sf because it did not let me - "Your registration
violated our antispam filter.")
https://sourceforge.net/p/nvram-wakeup/bios-mb-list/
Please let me know if I made any mistakes using the program or some
information is missing.
Thanks for your work!
--- System information. ---
Architecture:
Kernel: Linux 4.9.0-6-amd64
Debian Release: 9.4
500 stable-updates ftp.de.debian.org
500 stable-debug debug.mirrors.debian.org
500 stable security.debian.org
500 stable ftp.de.debian.org
--- Package information. ---
Depends (Version) | Installed
======================-+-===========
libc6 (>= 2.14) |
Package's Recommends field is empty.
Package's Suggests field is empty.
-------------- next part --------------
(gdb) Starting program: /usr/sbin/nvram-wakeup -D -A -C /etc/nvram-wakeup.conf
Program received signal SIGSEGV, Segmentation fault.
assign (lnr=lnr at entry=12, b=b at entry=0x555555795480 <b>, ptr=0x555555795494 <b+20>, val=val at entry=0x5555557974a1 "0x4A", allow_symbolic=allow_symbolic at entry=0) at readconf.c:73
73 readconf.c: Datei oder Verzeichnis nicht gefunden.
(gdb) #0 assign (lnr=lnr at entry=12, b=b at entry=0x555555795480 <b>, ptr=0x555555795494 <b+20>, val=val at entry=0x5555557974a1 "0x4A", allow_symbolic=allow_symbolic at entry=0) at readconf.c:73
tail = 0x555555797480 "addr_stat"
prev = 0x55795754
#1 0x000055555557ed44 in readconf (b=0x555555795480 <b>, filename=0x7fffffffe641 "/etc/nvram-wakeup.conf") at readconf.c:183
ret = <optimized out>
line = 0x555555796260 ""
rest = <optimized out>
comment = <optimized out>
name = <optimized out>
val = 0x5555557974a1 "0x4A"
n = 0
lnr = 12
fd_conf = 0x555555796030
#2 0x0000555555575147 in main (argc=0, argv=<optimized out>) at nvram-wakeup.c:125
retval = <optimized out>
addr = <optimized out>
changed = 0
need_reboot = 0
oChkH = 0x7ffff7de30c1 <_dl_lookup_symbol_x+353> "H\203\304\060\203", <incomplete sequence \370>
oChkL = 0x0
nChkH = 0x7fffffffe2a0 "Ȳ\271\367\005"
nChkL = 0x0
oChk = 0
nChk = 0
oChkH2 = 0x0
oChkL2 = 0x0
nChkH2 = 0x7ffff7ffe708 ""
---Type <return> to continue, or q <return> to quit--- nChkL2 = 0x0
oChk2 = 0
nChk2 = 0
oStat = 0x0
nStat = 0x0
oMon = 0x7ffff7ffea90 "\300\351\377\367\377\177"
nMon = 0x7fffffffe1b0 "h\242\377\367\377\177"
oDay = 0x0
nDay = 0x7ffff7ffe708 ""
oWdays = 0x7fffffffe1a0 "\377\377\377\377"
nWdays = 0x7ffff7b9b2e7 "__vdso_getcpu"
oHour = 0x6562b026 <error: Cannot access memory at address 0x6562b026>
nHour = 0xffffffff <error: Cannot access memory at address 0xffffffff>
oMin = 0x0
nMin = 0x7ffff7ffa268 "6"
oSec = 0x7ffff7ffe708 ""
nSec = 0x0
oRtcDay = 0x0
nRtcDay = 0x0
oRtcMon = 0x0
nRtcMon = 0x0
oRtc_tm = {tm_sec = 0, tm_min = 0, tm_hour = 0, tm_mday = 0, tm_mon = 0, tm_year = 0, tm_wday = 0, tm_yday = 0, tm_isdst = 0}
nRtc_tm = {tm_sec = -7272, tm_min = 32767, tm_hour = -7520, tm_mday = 32767, tm_mon = -134225552, tm_year = 32767, tm_wday = 0, tm_yday = 0, tm_isdst = 1}
vdr_abs_tm = <optimized out>
get_the_time = <optimized out>
now = 0
(gdb) quit
A debugging session is active.
---Type <return> to continue, or q <return> to quit---
Inferior 1 [process 2029] will be killed.
Quit anyway? (y or n) [answered Y; input not from terminal]
(gdb) Starting program: /usr/sbin/nvram-wakeup -D -A -C /etc/nvram-wakeup.conf -s 1529970074
Program received signal SIGSEGV, Segmentation fault.
assign (lnr=lnr at entry=12, b=b at entry=0x555555795480 <b>, ptr=0x555555795494 <b+20>, val=val at entry=0x5555557974a1 "0x4A", allow_symbolic=allow_symbolic at entry=0) at readconf.c:73
73 readconf.c: No such file or directory.
(gdb) #0 assign (lnr=lnr at entry=12, b=b at entry=0x555555795480 <b>, ptr=0x555555795494 <b+20>, val=val at entry=0x5555557974a1 "0x4A", allow_symbolic=allow_symbolic at entry=0) at readconf.c:73
tail = 0x555555797480 "addr_stat"
prev = 0x55795754
#1 0x000055555557ed44 in readconf (b=0x555555795480 <b>, filename=0x7fffffffe633 "/etc/nvram-wakeup.conf") at readconf.c:183
ret = <optimized out>
line = 0x555555796260 ""
rest = <optimized out>
comment = <optimized out>
name = <optimized out>
val = 0x5555557974a1 "0x4A"
n = 0
lnr = 12
fd_conf = 0x555555796030
#2 0x0000555555575147 in main (argc=0, argv=<optimized out>) at nvram-wakeup.c:125
retval = <optimized out>
addr = <optimized out>
changed = 0
need_reboot = 0
oChkH = 0x7ffff7de30c1 <_dl_lookup_symbol_x+353> "H\203\304\060\203\370"
oChkL = 0x0
nChkH = 0x7fffffffe280 "\310\262\271\367\a"
nChkL = 0x0
oChk = 0
nChk = 0
oChkH2 = 0x0
oChkL2 = 0x0
nChkH2 = 0x7ffff7ffe708 ""
---Type <return> to continue, or q <return> to quit--- nChkL2 = 0x0
oChk2 = 0
nChk2 = 0
oStat = 0x0
nStat = 0x0
oMon = 0x7ffff7ffea90 "\300\351\377\367\377\177"
nMon = 0x7fffffffe190 "h\242\377\367\377\177"
oDay = 0x0
nDay = 0x7ffff7ffe708 ""
oWdays = 0x7fffffffe180 "\377\377\377\377"
nWdays = 0x7ffff7b9b2e7 "__vdso_getcpu"
oHour = 0x6562b026 <error: Cannot access memory at address 0x6562b026>
nHour = 0xffffffff <error: Cannot access memory at address 0xffffffff>
oMin = 0x0
nMin = 0x7ffff7ffa268 "6"
oSec = 0x7ffff7ffe708 ""
nSec = 0x0
oRtcDay = 0x0
nRtcDay = 0x0
oRtcMon = 0x0
nRtcMon = 0x0
oRtc_tm = {tm_sec = 0, tm_min = 0, tm_hour = 0, tm_mday = 0, tm_mon = 0, tm_year = 0, tm_wday = 0, tm_yday = 0, tm_isdst = 0}
nRtc_tm = {tm_sec = -7288, tm_min = 32767, tm_hour = -7552, tm_mday = 32767, tm_mon = -134225552, tm_year = 32767, tm_wday = 0, tm_yday = 0, tm_isdst = 1}
vdr_abs_tm = <optimized out>
get_the_time = <optimized out>
now = 0
(gdb) quit
A debugging session is active.
---Type <return> to continue, or q <return> to quit---
Inferior 1 [process 2166] will be killed.
Quit anyway? (y or n) [answered Y; input not from terminal]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: guess-error.log
Type: text/x-log
Size: 5043 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-vdr-dvb-devel/attachments/20180626/0a6ffe64/attachment.bin>
-------------- next part --------------
################################################
## Mainboard autodetection information:
##
## - Mainboard vendor: "ASUSTeK Computer INC."
## - Mainboard type: "M2NS-NVM"
## - Mainboard revision: "1.XX"
## - BIOS vendor: "Phoenix Technologies, LTD"
## - BIOS version: "M2NS-NVM 0103"
## - BIOS release: "08/31/2006"
addr_stat = 0x4A
shift_stat = 3
addr_day = 0x4C
addr_hour = 0x4D
addr_min = 0x4E
addr_sec = 0x4F
addr_chk_h = 0x6D
addr_chk_l = 0x6E
upper_method = VT82Cxxx
-------------- next part --------------
################################################
## Mainboard autodetection information:
##
## - Mainboard vendor: "ASUSTeK Computer INC."
## - Mainboard type: "M2NS-NVM"
## - Mainboard revision: "1.XX"
## - BIOS vendor: "Phoenix Technologies, LTD"
## - BIOS version: "M2NS-NVM 0103"
## - BIOS release: "08/31/2006"
##addr_stat = 0x4A
#shift_stat = 3
#addr_day = 0x4C
#addr_hour = 0x4D
#addr_min = 0x4E
#addr_sec = 0x4F
#addr_chk_h = 0x6D
#addr_chk_l = 0x6E
#upper_method = VT82Cxxx
More information about the pkg-vdr-dvb-devel
mailing list