Cisco-Talos / cvdupdate

ClamAV Private Database Mirror Updater Tool
Apache License 2.0
93 stars 35 forks source link

cdiff files not being downloaded since 1.1.0 #45

Closed dlresende closed 2 years ago

dlresende commented 2 years ago

Hi team,

We just saw a change in behaviour which we'd like to validate with you.

Until version 1.0.2, cdiff files were being downloaded on updates:

$ cvd config set --dbdir $PWD
$ cvd update

2022-05-28 23:19:47 cvdupdate-1.0.2 INFO Downloaded main-62.cdiff
2022-05-28 23:19:57 cvdupdate-1.0.2 INFO Downloaded main.cvd. Version: 62
2022-05-28 23:19:58 cvdupdate-1.0.2 INFO Downloaded daily-26555.cdiff
2022-05-28 23:20:01 cvdupdate-1.0.2 INFO Downloaded daily.cvd. Version: 26555
2022-05-28 23:20:02 cvdupdate-1.0.2 INFO Downloaded bytecode-333.cdiff
2022-05-28 23:20:03 cvdupdate-1.0.2 INFO Downloaded bytecode.cvd. Version: 333

Since version 1.1.0 the cdiff files are no longer being downloaded:

$ cvd config set --dbdir $PWD
$ cvd update

2022-05-29 01:20:48 cvdupdate-1.1.0 INFO Using system configured nameservers
2022-05-29 01:20:50 cvdupdate-1.1.0 INFO Downloaded main.cvd
2022-05-29 01:20:50 cvdupdate-1.1.0 INFO Downloaded daily.cvd
2022-05-29 01:20:50 cvdupdate-1.1.0 INFO Downloaded bytecode.cvd

Reading the changelog it's not clear to me whether this is expected or it's a side effect of the config.json + state.json split or something else.

I'd appreciate any help in clarifying this :)

micahsnyder commented 2 years ago

Hi @dlresende thanks for reporting this. It appears to have been an accidental side effect of the recent changes. In local testing I see what you mean. For downloading a new CVD it doesn't appear to be grabbing the cdiff files, but when updating to a newer version it does grab the cdiff files. It would be better to always get those cdiff files, as before.

I'll see if I can get a fix and 1.1.1 patch release out soon.

ifindlay-cci commented 2 years ago

@micahsnyder any news/progress on this?

matdemb commented 2 years ago

Hi, still no news for this annoying bug?

micahsnyder commented 2 years ago

Just created a PR that I think will fix the issue while keeping the improvement in the last release that re-downloads a CVD if accidentally deleted or moved.