rtl-entropy icon indicating copy to clipboard operation
rtl-entropy copied to clipboard

rtl_entropy -e causes sigsegv

Open ghost opened this issue 6 years ago • 2 comments

I've run rtl_entropy -f 74M -e and the output is as follows snip the last few lines

timerfd_settime(8, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=0}}, NULL) = 0 ioctl(9, USBDEVFS_REAPURBNDELAY, 0x7ffd9393ce90) = -1 EAGAIN (Resource temporarily unavailable) timerfd_settime(8, TFD_TIMER_ABSTIME, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=9286, tv_nsec=46015000}}, NULL) = 0 ioctl(9, USBDEVFS_SUBMITURB, 0x55b2930d1ba0) = 0 poll([{fd=6, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLOUT}], 3, 60000) = 1 ([{fd=9, revents=POLLOUT}]) ioctl(9, USBDEVFS_REAPURBNDELAY, 0x7ffd9393ce50) = 0 timerfd_settime(8, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=0}}, NULL) = 0 ioctl(9, USBDEVFS_REAPURBNDELAY, 0x7ffd9393ce50) = -1 EAGAIN (Resource temporarily unavailable) timerfd_settime(8, TFD_TIMER_ABSTIME, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=9286, tv_nsec=48070000}}, NULL) = 0 ioctl(9, USBDEVFS_SUBMITURB, 0x55b2930d1ba0) = 0 poll([{fd=6, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLOUT}], 3, 60000) = 1 ([{fd=9, revents=POLLOUT}]) ioctl(9, USBDEVFS_REAPURBNDELAY, 0x7ffd9393ce50) = 0 timerfd_settime(8, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=0}}, NULL) = 0 ioctl(9, USBDEVFS_REAPURBNDELAY, 0x7ffd9393ce50) = -1 EAGAIN (Resource temporarily unavailable) timerfd_settime(8, TFD_TIMER_ABSTIME, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=9286, tv_nsec=50140000}}, NULL) = 0 ioctl(9, USBDEVFS_SUBMITURB, 0x55b2930d1ba0) = 0 poll([{fd=6, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLOUT}], 3, 60000) = 1 ([{fd=9, revents=POLLOUT}]) ioctl(9, USBDEVFS_REAPURBNDELAY, 0x7ffd9393ce50) = 0 timerfd_settime(8, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=0}}, NULL) = 0 ioctl(9, USBDEVFS_REAPURBNDELAY, 0x7ffd9393ce50) = -1 EAGAIN (Resource temporarily unavailable) timerfd_settime(8, TFD_TIMER_ABSTIME, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=9286, tv_nsec=52384000}}, NULL) = 0 ioctl(9, USBDEVFS_SUBMITURB, 0x55b2930d1ba0) = 0 poll([{fd=6, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLOUT}], 3, 60000) = 1 ([{fd=9, revents=POLLOUT}]) ioctl(9, USBDEVFS_REAPURBNDELAY, 0x7ffd9393ce90) = 0 timerfd_settime(8, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=0}}, NULL) = 0 ioctl(9, USBDEVFS_REAPURBNDELAY, 0x7ffd9393ce90) = -1 EAGAIN (Resource temporarily unavailable) timerfd_settime(8, TFD_TIMER_ABSTIME, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=9286, tv_nsec=54974000}}, NULL) = 0 ioctl(9, USBDEVFS_SUBMITURB, 0x55b2930d1ba0) = 0 poll([{fd=6, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLOUT}], 3, 60000) = 1 ([{fd=9, revents=POLLOUT}]) ioctl(9, USBDEVFS_REAPURBNDELAY, 0x7ffd9393ce90) = 0 timerfd_settime(8, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=0}}, NULL) = 0 ioctl(9, USBDEVFS_REAPURBNDELAY, 0x7ffd9393ce90) = -1 EAGAIN (Resource temporarily unavailable) write(2, "Doing FIPS init", 15Doing FIPS init) = 15 write(2, "\n", 1 ) = 1 write(2, "Reading samples in sync mode...", 31Reading samples in sync mode...) = 31 write(2, "\n", 1 ) = 1 ioctl(9, USBDEVFS_SUBMITURB, 0x55b2930d1ba0) = 0 poll([{fd=6, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLOUT}], 3, 60000) = 1 ([{fd=9, revents=POLLOUT}]) ioctl(9, USBDEVFS_REAPURBNDELAY, 0x7ffd9393ced0) = 0 ioctl(9, USBDEVFS_REAPURBNDELAY, 0x7ffd9393ced0) = -1 EAGAIN (Resource temporarily unavailable) --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} --- +++ killed by SIGSEGV (core dumped) +++ Segmentation fault

Any ideas, works fine without -e

ghost avatar Jun 02 '18 03:06 ghost

Bump, still an issue, just reproduced it on my CentOS 8 system.

RyuKay24 avatar May 25 '20 13:05 RyuKay24

G'day, thanks for writing in again.

I can confirm it does this for me too on debian 10.4, I've narrowed itt down the EVP_EncryptInit_ex() function from OpenSSL, I imagine I'm not calling it with the correct parameters.

I'll have a crack at fixing it over the next week or two, but if I can't immediately figure it out, I plan to push on with me ground up re-write. I've learnt a lot since I did this code!

pwarren avatar Jun 02 '20 13:06 pwarren