kernel-2.6.23: USB key protection problem
Dario Lesca
d.lesca at solinos.it
Fri Oct 26 10:31:14 UTC 2007
Hi, I have Found this issue on:
o f7 + kernel-2.6.23 (last from development)
o f8t3 + up to date (then kernel-2.6.23)
In this 2 Scenarios My USB KEY for software protection not work.
On f7 + standard kernel my key work ok (see strace 1), if I install last
kernel from updates (or I use f8t3) my key not work (see strace-2)
Someone can suggest me some work around ... or this is a issue of new
version of kernel?
Many thanks.
strace-1:
> 4243 execve("./testskey", ["./testskey"], [/* 26 vars */]) = 0
> 4243 brk(0) = 0x8daf000
> 4243 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
> 4243 open("/etc/ld.so.cache", O_RDONLY) = 3
> 4243 fstat64(3, {st_mode=S_IFREG|0644, st_size=44446, ...}) = 0
> 4243 mmap2(NULL, 44446, PROT_READ, MAP_PRIVATE, 3, 0) = 0x111000
> 4243 close(3) = 0
> 4243 open("/lib/libc.so.6", O_RDONLY) = 3
> 4243 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\240\271\0004\0\0\0"..., 512) = 512
> 4243 fstat64(3, {st_mode=S_IFREG|0755, st_size=1673804, ...}) = 0
> 4243 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x11c000
> 4243 mmap2(0xb84000, 1390032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb84000
> 4243 mmap2(0xcd2000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14e) = 0xcd2000
> 4243 mmap2(0xcd5000, 9680, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xcd5000
> 4243 close(3) = 0
> 4243 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x11d000
> 4243 set_thread_area({entry_number:-1 -> 6, base_addr:0x11cde0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
> 4243 mprotect(0xcd2000, 8192, PROT_READ) = 0
> 4243 mprotect(0xb80000, 4096, PROT_READ) = 0
> 4243 munmap(0x111000, 44446) = 0
> 4243 fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
> 4243 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x111000
> 4243 write(1, "Key Demo Program\n", 22) = 22
> 4243 write(1, "\n", 1) = 1
> 4243 access("/dev/bus/usb", F_OK) = 0
> 4243 open("/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
> 4243 fstat64(3, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> 4243 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
> 4243 brk(0) = 0x8daf000
> 4243 brk(0x8dd1000) = 0x8dd1000
> 4243 getdents(3, /* 4 entries */, 4096) = 64
> 4243 access("/dev/bus/usb", F_OK) = 0
> 4243 open("/dev/bus/usb/001", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4
> 4243 fstat64(4, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> 4243 fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
> 4243 getdents(4, /* 4 entries */, 4096) = 64
> 4243 getdents(4, /* 0 entries */, 4096) = 0
> 4243 close(4) = 0
> 4243 access("/dev/bus/usb", F_OK) = 0
> 4243 open("/dev/bus/usb/001", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4
> 4243 fstat64(4, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> 4243 fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
> 4243 getdents(4, /* 4 entries */, 4096) = 64
> 4243 getdents(4, /* 0 entries */, 4096) = 0
> 4243 close(4) = 0
> 4243 getdents(3, /* 0 entries */, 4096) = 0
> 4243 brk(0x8dd0000) = 0x8dd0000
> 4243 close(3) = 0
> 4243 access("/dev/bus/usb", F_OK) = 0
> 4243 open("/dev/bus/usb/001/002", O_RDWR) = 3
> 4243 read(3, "\22\1\20\1\377\0\0 =\7%\0\0\2\1\2\0\1", 18) = 18
> 4243 fcntl64(3, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}) = 0
> 4243 times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 429783343
> 4243 ioctl(3, USBDEVFS_CONTROL, 0xbf9b5c30) = 8
> 4243 ioctl(3, USBDEVFS_CONTROL, 0xbf9b5c30) = 8
> 4243 times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 429783345
> 4243 ioctl(3, USBDEVFS_CONTROL, 0xbf9b5a90) = 8
> 4243 ioctl(3, USBDEVFS_CONTROL, 0xbf9b5a90) = 8
> 4243 times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 429783346
> 4243 ioctl(3, USBDEVFS_CONTROL, 0xbf9b5a10) = 8
> 4243 ioctl(3, USBDEVFS_CONTROL, 0xbf9b5a10) = 8
> 4243 times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 429783347
> 4243 ioctl(3, USBDEVFS_CONTROL, 0xbf9b5980) = 8
> 4243 ioctl(3, USBDEVFS_CONTROL, 0xbf9b5980) = 8
> 4243 times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 429783348
> 4243 ioctl(3, USBDEVFS_CONTROL, 0xbf9b59d0) = 8
> 4243 ioctl(3, USBDEVFS_CONTROL, 0xbf9b59d0) = 8
> 4243 times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 429783350
> 4243 ioctl(3, USBDEVFS_CONTROL, 0xbf9b59d0) = 8
> 4243 ioctl(3, USBDEVFS_CONTROL, 0xbf9b59d0) = 24
> 4243 close(3) = 0
> 4243 sched_yield() = 0
> 4243 write(1, "Locating : Key found on por"..., 39) = 39
strace-2:
> 3427 execve("./testskey", ["./testskey"], [/* 25 vars */]) = 0
> 3427 brk(0) = 0x9581000
> 3427 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
> 3427 open("/etc/ld.so.cache", O_RDONLY) = 3
> 3427 fstat64(3, {st_mode=S_IFREG|0644, st_size=44446, ...}) = 0
> 3427 mmap2(NULL, 44446, PROT_READ, MAP_PRIVATE, 3, 0) = 0x111000
> 3427 close(3) = 0
> 3427 open("/lib/libc.so.6", O_RDONLY) = 3
> 3427 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\240\271\0004\0\0\0"..., 512) = 512
> 3427 fstat64(3, {st_mode=S_IFREG|0755, st_size=1673804, ...}) = 0
> 3427 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x11c000
> 3427 mmap2(0xb84000, 1390032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb84000
> 3427 mmap2(0xcd2000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14e) = 0xcd2000
> 3427 mmap2(0xcd5000, 9680, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xcd5000
> 3427 close(3) = 0
> 3427 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x11d000
> 3427 set_thread_area({entry_number:-1 -> 6, base_addr:0x11cde0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
> 3427 mprotect(0xcd2000, 8192, PROT_READ) = 0
> 3427 mprotect(0xb80000, 4096, PROT_READ) = 0
> 3427 munmap(0x111000, 44446) = 0
> 3427 fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
> 3427 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x111000
> 3427 write(1, "Key Demo Program\n", 22) = 22
> 3427 write(1, "\n", 1) = 1
> 3427 access("/dev/bus/usb", F_OK) = 0
> 3427 open("/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
> 3427 fstat64(3, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> 3427 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
> 3427 brk(0) = 0x9581000
> 3427 brk(0x95a3000) = 0x95a3000
> 3427 getdents(3, /* 4 entries */, 4096) = 64
> 3427 access("/dev/bus/usb", F_OK) = 0
> 3427 open("/dev/bus/usb/001", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4
> 3427 fstat64(4, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> 3427 fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
> 3427 getdents(4, /* 4 entries */, 4096) = 64
> 3427 getdents(4, /* 0 entries */, 4096) = 0
> 3427 close(4) = 0
> 3427 access("/dev/bus/usb", F_OK) = 0
> 3427 open("/dev/bus/usb/001", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4
> 3427 fstat64(4, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> 3427 fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
> 3427 getdents(4, /* 4 entries */, 4096) = 64
> 3427 getdents(4, /* 0 entries */, 4096) = 0
> 3427 close(4) = 0
> 3427 getdents(3, /* 0 entries */, 4096) = 0
> 3427 brk(0x95a2000) = 0x95a2000
> 3427 close(3) = 0
> 3427 access("/dev/bus/usb", F_OK) = 0
> 3427 open("/dev/bus/usb/001/002", O_RDWR) = 3
> 3427 read(3, "\22\1\20\1\377\0\0 =\7%\0\0\2\1\2\0\1", 18) = 18
> 3427 fcntl64(3, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}) = 0
> 3427 times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 429463882
> 3427 ioctl(3, USBDEVFS_CONTROL, 0xbfd794c0) = 8
> 3427 ioctl(3, USBDEVFS_CONTROL, 0xbfd794c0) = -1 EILSEQ (Invalid or incomplete multibyte or wide character)
> 3427 ioctl(3, USBDEVFS_CONTROL, 0xbfd794c0) = -1 ETIMEDOUT (Connection timed out)
> 3427 close(3) = 0
> 3427 sched_yield() = 0
--
Dario Lesca <d.lesca at solinos.it>
More information about the users
mailing list