Page MenuHomePhabricator

sclockadjProject
ActivePublic

Members (1)

Watchers

  • This project does not have any watchers.
  • View All

Recent Activity

Jun 5 2022

Patrick updated the task description for T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock.
Jun 5 2022, 9:36 AM · Whonix, C Code, sclockadj, sdwdate
Patrick added a comment to T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock.

https://www.kicksecure.com/wiki/Dev/sdwdate#chrony_as_a_replacement_for_sclockadj

Jun 5 2022, 9:36 AM · Whonix, C Code, sclockadj, sdwdate

Sep 18 2018

marmarek added a comment to T691: sdwdate sclockadj change time without spamming logs.

Actually, the "apt-daily.timer: Adding 1h 17min 24.927437s random time" message have real impact, not only noise. Each time sdwdate change time, systemd adds a random delay to those timers. which means the timer will never expire (unless that random delay will happen to be very close to 0 - i.e. below the time until sdwdate change the time, which looks to be 1s).

Sep 18 2018, 1:55 AM · systemd, research, sclockadj, sdwdate, Whonix

Aug 7 2018

HulaHoop added a comment to T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock.

In theory, we could make sdwdate provide a local (default) (or optional opt-in server) NTP compatible time provider. Could be useful anyhow. -> sdwdate-server No idea how hard that would be.

And then configure NTP to connect only to that local NTP server.

Aug 7 2018, 6:37 AM · Whonix, C Code, sclockadj, sdwdate
HulaHoop closed T814: find out what the most popular time synchronization daemon is / find out debian's default time synchronization daemon as Resolved.
Aug 7 2018, 6:16 AM · Whonix, Whonix 15, sclockadj, sdwdate
HulaHoop closed T814: find out what the most popular time synchronization daemon is / find out debian's default time synchronization daemon, a subtask of T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock, as Resolved.
Aug 7 2018, 6:16 AM · Whonix, C Code, sclockadj, sdwdate

Aug 6 2018

Patrick added a comment to T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock.

/usr/sbin/ntpdate as far as I know doesn't accept a command line command to take an offset (or anything). It connects to remote servers in its default design.

Aug 6 2018, 6:59 PM · Whonix, C Code, sclockadj, sdwdate
Patrick added a comment to T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock.

Yes, not readily accessible from command line.

Aug 6 2018, 6:48 PM · Whonix, C Code, sclockadj, sdwdate
HulaHoop added a comment to T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock.

The easy way: calculating the offset between local time and the onion average in timesync then using ntpdate's slew option if the offset is less than 0.5s. Otherwise you tell it to step up the time immediately so that you are accurately mimicking the default behavior. However you can force slewing all the time with -B. This way you won't need to touch kernel syscalls as ntpdate should be able to do the operation for you.

Aug 6 2018, 6:28 PM · Whonix, C Code, sclockadj, sdwdate
HulaHoop added a comment to T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock.

From what I understand, this code path is only relevant when timesyncd is talking directly with NTP servers and reacting to replies about deltas between local and remote times. There is no way you can call that function from the command line when using timedatectl standalone AFAICT.

Aug 6 2018, 3:46 PM · Whonix, C Code, sclockadj, sdwdate

Aug 5 2018

Patrick updated the task description for T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock.
Aug 5 2018, 1:58 PM · Whonix, C Code, sclockadj, sdwdate
Patrick added a comment to T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock.

It doesn't seem that timedatectl supports gradual time adjustment.

Aug 5 2018, 1:52 PM · Whonix, C Code, sclockadj, sdwdate

Jul 27 2018

HulaHoop added a comment to T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock.

Since we are interested in ntpd's default behavior (for blending in purposes) it turns out that it performs instant clock jumps once the delta difference is excessively large otherwise its slewing algorithm would take forever to adjust the time.

Jul 27 2018, 5:33 PM · Whonix, C Code, sclockadj, sdwdate
HulaHoop added a comment to T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock.

It doesn't seem that timedatectl supports gradual time adjustment. Our next best option is ntpd which can do so but cannot coexist with timedatectl - we can only run either but not both. According to popcon, ntpd is the mos widely used time daemon so its the natural choice.

Jul 27 2018, 4:22 PM · Whonix, C Code, sclockadj, sdwdate
Patrick added a comment to T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock.

Currently time is set using gnu date (clock jump) (initial run after current boot) or sclockadj (consecutive run) (slow clock adjustment).

Jul 27 2018, 7:35 AM · Whonix, C Code, sclockadj, sdwdate

Jul 25 2018

HulaHoop added a comment to T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock.

the time could be set with timedatectl by feeding it the time with this command:

Jul 25 2018, 7:20 PM · Whonix, C Code, sclockadj, sdwdate
HulaHoop added a comment to T814: find out what the most popular time synchronization daemon is / find out debian's default time synchronization daemon.

Stretch+ uses systemd-timesyncd by default therefore its the most popular.

Jul 25 2018, 6:38 PM · Whonix, Whonix 15, sclockadj, sdwdate
Patrick added a subtask for T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock: T814: find out what the most popular time synchronization daemon is / find out debian's default time synchronization daemon.
Jul 25 2018, 7:41 AM · Whonix, C Code, sclockadj, sdwdate
Patrick added a parent task for T814: find out what the most popular time synchronization daemon is / find out debian's default time synchronization daemon: T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock.
Jul 25 2018, 7:41 AM · Whonix, Whonix 15, sclockadj, sdwdate
Patrick triaged T815: sclockadj fingerprinting defense - set time using sclockadj the same way NTP / sntp / chrony / systemd-timesyncd is changing the clock as Normal priority.
Jul 25 2018, 7:22 AM · Whonix, C Code, sclockadj, sdwdate
Patrick triaged T814: find out what the most popular time synchronization daemon is / find out debian's default time synchronization daemon as Normal priority.
Jul 25 2018, 6:53 AM · Whonix, Whonix 15, sclockadj, sdwdate
Patrick closed T691: sdwdate sclockadj change time without spamming logs as Resolved.

This is sorted in a later version of systemd.

Jul 25 2018, 6:39 AM · systemd, research, sclockadj, sdwdate, Whonix
Patrick edited projects for T691: sdwdate sclockadj change time without spamming logs, added: systemd; removed Whonix 16.
Jul 25 2018, 6:39 AM · systemd, research, sclockadj, sdwdate, Whonix
Patrick closed T50: systemd spams journal due to time changed by sclockadj, rewrite of sclockadj, sclockadj2 as Resolved.

sclockadj3 is done -> T686.

Jul 25 2018, 6:35 AM · C Code, python, bug, Whonix, sdwdate, sclockadj

Oct 31 2017

Patrick added a comment to T695: Whonix running as Qubes DispVM uses saved clock.

Qubes-Whonix DispVMs won't get any more development attention in Qubes
R3.2 because so much has changed. Please look into Qubes R4.

Oct 31 2017, 8:29 PM · Whonix 14, Whonix 13, Whonix, sclockadj
awokd added a comment to T695: Whonix running as Qubes DispVM uses saved clock.

I didn't notice this bug earlier but caught a reference in one of the Qubes mailing list discussions. For what it's worth, I got this to function under Qubes 3.2 by deleting the sdwdate systemd unit files. It has been a while but I think I did that in the whonix-ws template. The dispvm appears to call bootclockrandomization on every start so time correlation is avoided and I no longer encounter times off by 2+ weeks.

Oct 31 2017, 5:05 PM · Whonix 14, Whonix 13, Whonix, sclockadj

Jul 23 2017

Patrick closed T695: Whonix running as Qubes DispVM uses saved clock as Wontfix.

Unless someone else will be taking this one...

Jul 23 2017, 4:06 PM · Whonix 14, Whonix 13, Whonix, sclockadj
Patrick edited projects for T691: sdwdate sclockadj change time without spamming logs, added: Whonix 16; removed Whonix 14.
Jul 23 2017, 3:54 PM · systemd, research, sclockadj, sdwdate, Whonix

Jul 7 2017

marmarek added a comment to T695: Whonix running as Qubes DispVM uses saved clock.

Yes to both of you:

  • should just work on Qubes 4.0 (savefiles are not used there anymore)
  • calling qubes.GetRandomizedTime as post-suspend action would fix that too
Jul 7 2017, 6:13 PM · Whonix 14, Whonix 13, Whonix, sclockadj
anon5577 added a comment to T695: Whonix running as Qubes DispVM uses saved clock.

This does not seem to happen every time, strangely enough. It seems sdwdate should call qubes.GetRandomizedTime as a post-suspend action if I read this correctly. So I guess under some circumstances that step does not run.

Jul 7 2017, 2:28 PM · Whonix 14, Whonix 13, Whonix, sclockadj

Jun 29 2017

Patrick added a comment to T695: Whonix running as Qubes DispVM uses saved clock.

@marmarek this is probably due to Qubes current DispVM savefile implementation? It should fix itself in Qubes R4.0 since DispVM implementation changed there?

Jun 29 2017, 4:56 PM · Whonix 14, Whonix 13, Whonix, sclockadj

Jun 22 2017

Patrick edited projects for T695: Whonix running as Qubes DispVM uses saved clock, added: Whonix 13, Whonix 14; removed Whonix 12.
Jun 22 2017, 11:31 AM · Whonix 14, Whonix 13, Whonix, sclockadj
anon5577 created T695: Whonix running as Qubes DispVM uses saved clock.
Jun 22 2017, 11:17 AM · Whonix 14, Whonix 13, Whonix, sclockadj
Patrick added a project to T691: sdwdate sclockadj change time without spamming logs: Whonix 14.

For now, I remain positive this can and should be sorted out for Whonix 14.

Jun 22 2017, 10:33 AM · systemd, research, sclockadj, sdwdate, Whonix

Jun 20 2017

JasonJAyalaP edited projects for T691: sdwdate sclockadj change time without spamming logs, added: research; removed Whonix 14.

Removing Whonix 14 tag. It's not necessary to block 14.

Jun 20 2017, 8:16 PM · systemd, research, sclockadj, sdwdate, Whonix

Jun 17 2017

JasonJAyalaP closed T686: Port to sclockadj3 as Resolved.
Jun 17 2017, 3:15 AM · sclockadj, sdwdate, Whonix, Whonix 14

Jun 16 2017

Patrick added a comment to T691: sdwdate sclockadj change time without spamming logs.
Jun 16 2017, 11:30 PM · systemd, research, sclockadj, sdwdate, Whonix
Patrick added a comment to T686: Port to sclockadj3.

JasonJAyalaP (Jason J. Ayala P.):

JasonJAyalaP added a comment.

@Patrick 
is it working for you?
Jun 16 2017, 11:04 PM · sclockadj, sdwdate, Whonix, Whonix 14
JasonJAyalaP added a comment to T691: sdwdate sclockadj change time without spamming logs.

When ntp needs to adjust more than 128ms, it uses settimeofday to make one big jump.

Jun 16 2017, 10:21 PM · systemd, research, sclockadj, sdwdate, Whonix
JasonJAyalaP added a comment to T686: Port to sclockadj3.

@Patrick
is it working for you?

Jun 16 2017, 9:37 PM · sclockadj, sdwdate, Whonix, Whonix 14
Patrick added a comment to T691: sdwdate sclockadj change time without spamming logs.

s.sh (ssh):

s.sh added a comment.

Is there a way to use functions like clock_settime without
reporting to the log

There are generally three ways:

  1. Hook into the related library call and prevent the syscall

function from being called. 2. Immediately after writing to system
logs following a call to clock_settime() make the appended logs
removed. 3. During the time of calling clock_settime(), disable the
syslog at system level, after returning from the aforementioned
function re-enable logging.

Jun 16 2017, 3:08 PM · systemd, research, sclockadj, sdwdate, Whonix
s.sh added a comment to T691: sdwdate sclockadj change time without spamming logs.

Is there a way to use functions like clock_settime without reporting to the log

Jun 16 2017, 2:07 PM · systemd, research, sclockadj, sdwdate, Whonix
Patrick renamed T691: sdwdate sclockadj change time without spamming logs from [Research] Change time without spamming logs to sdwdate sclockadj change time without spamming logs.
Jun 16 2017, 10:26 AM · systemd, research, sclockadj, sdwdate, Whonix
Patrick raised the priority of T691: sdwdate sclockadj change time without spamming logs from Low to Normal.
Jun 16 2017, 10:25 AM · systemd, research, sclockadj, sdwdate, Whonix

Jun 15 2017

JasonJAyalaP closed T650: review 30 lines of sclockadj inline C code as Resolved.
Jun 15 2017, 8:42 PM · Whonix 14, Whonix, sclockadj, sdwdate, C Code

Jun 14 2017

Patrick added a comment to T650: review 30 lines of sclockadj inline C code.

Please create a new ticket for porting to some better C function.

Jun 14 2017, 10:18 AM · Whonix 14, Whonix, sclockadj, sdwdate, C Code
JasonJAyalaP added a comment to T650: review 30 lines of sclockadj inline C code.

adjtimex, as far as I can tell, is for tuning the clock to stay accurate. It's not directly for setting a new time. I assume it's used by ntp to speed up and slow down the clock, with more code that checks on it and stops it when it reaches the right time. Reimplementing this is beyond my skill.

Jun 14 2017, 1:14 AM · Whonix 14, Whonix, sclockadj, sdwdate, C Code

Jun 8 2017

JasonJAyalaP claimed T650: review 30 lines of sclockadj inline C code.
Jun 8 2017, 5:10 PM · Whonix 14, Whonix, sclockadj, sdwdate, C Code
JasonJAyalaP added a comment to T650: review 30 lines of sclockadj inline C code.

OK. It might strain my limited C knowledge, but I'll give it shot.

Jun 8 2017, 5:09 PM · Whonix 14, Whonix, sclockadj, sdwdate, C Code

Jun 7 2017

marmarek added a comment to T650: review 30 lines of sclockadj inline C code.

Looks like at least NTP and chrony use ntp_adjtime/adjtimex

Jun 7 2017, 11:30 PM · Whonix 14, Whonix, sclockadj, sdwdate, C Code