Skip to content

Releases: lneely/pcloudcc-lneely

20260324T111500Z

24 Mar 11:15
7595c48

Choose a tag to compare

20260324T111500Z Pre-release
Pre-release
Fix bad-free heap corruption in ppathstatus and psyncer (#392)

* Fix bad-free heap corruption in ppathstatus and psyncer (#391)

Both ppathstatus.c and psyncer.c used bare free() via
ptree_for_each_element_call_safe to bulk-free tree nodes that were
allocated with pmem_malloc.  pmem_malloc prepends a pmem_header_t to
every allocation, so the returned pointer is an interior pointer to the
underlying glibc chunk.  Passing it to free() makes glibc read a garbage
size field from the pmem header and abort with "free(): invalid size".

This is the same class of bug fixed earlier in pintervaltree.c and
pfscrypto.c.  The crash manifests reliably with larger files because
more sync-queue and path-status churn occurs, increasing the likelihood
that one of these bulk-free paths is hit while a non-empty tree exists.

Fix: add free_folder_tasks_node() (ppathstatus.c) and
free_synced_down_folder() (psyncer.c) helpers that call pmem_free, and
use them as the ptree_for_each_element_call_safe callback in all three
affected call sites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix bad-free in pfs.c and ppagecache.c (pcl-26j)

Two more call sites passed bare free() as a callback to tree/list
traversal macros, but the nodes were allocated via pmem_malloc which
prepends a pmem_header_t. Freeing the data pointer directly skips the
header and corrupts the heap.

- pfs.c: ptree_for_each_element_call_safe on sectorsinlog used free()
  on psync_sector_inlog_t; replaced with free_sector_inlog_node() that
  calls pmem_free(PMEM_SUBSYS_OTHER, e).
- ppagecache.c: psync_list_for_each_element_call on request->ranges
  used free() on psync_request_range_t; replaced with
  free_request_range() that calls pmem_free(PMEM_SUBSYS_CACHE, range).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Add unit and smoke tests for pcl-26j bad-free (ppagecache, pfs, psyncer)

Unit test (test_pcl26j_free): exercises all four fixed call sites —
psync_request_range_t, synced_down_folder, folder_tasks_t, and
psync_sector_inlog_t — using --wrap=malloc/free to verify that
pmem_free() passes the header pointer to free(), not the data pointer.
Includes a harness self-check that confirms bare free(data_ptr) is
detected. Would have failed against pre-fix code.

Smoke test (smoke-test-large-read.sh): builds pcloudcc with ASAN,
starts the daemon, streams a large file (>=50 MB) from the FUSE mount
to /dev/null to force multi-range psync_request_range_t allocation and
teardown via psync_pagecache_free_request, then scans the ASAN log for
any bad-free reports.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Levi Neely <lkn@darkstar.example.net>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

20260311T214010Z

11 Mar 21:40
bf11ae3

Choose a tag to compare

20260311T214010Z Pre-release
Pre-release

Bug Fixes

  • Fix authsave to save both username and password (#390)

Changes

  • Update do_authsave() to call psync_set_user_pass() instead of psync_set_pass(), ensuring both username and password are persisted

20260311T212406Z

11 Mar 21:24
59a1a77

Choose a tag to compare

20260311T212406Z Pre-release
Pre-release

Features

  • Add authsave command to save authentication credentials (#389)

Changes

  • Add AUTHSAVE command definition to pcommands.h
  • Expose do_authsave() in pclsync_lib.h
  • Implement do_authsave() in pclsync_lib.cpp
  • Add authsave handler in control_tools.cpp

20260310T1252Z

10 Mar 12:52
9c10304

Choose a tag to compare

20260310T1252Z Pre-release
Pre-release

Fix memory leaks, bad-free errors, and FUSE3 shutdown issue

20260302T2039Z

02 Mar 20:39
d6858a0

Choose a tag to compare

20260302T2039Z Pre-release
Pre-release

What's Changed

  • Refactor logging, add cache-size, fs-event-log by @josenk in #163
  • Retry opening without the O_NOATIME flag by @Chris82111 in #167
  • Fix MBEDTLS-3.x.md: Add LIBLDFLAGS update to linker path by @lneely in #168
  • Fix #162: Add distro-agnostic mbedtls detection by @lneely in #169
  • Add reference to pcloudcc-service by @lneely in #170
  • Add new pCloud SSL certificate fingerprint by @lneely in #172
  • Fix #67: Add sync pause and sync resume commands by @lneely in #173
  • Remove obsolete Pending Transfers section from README by @lneely in #174
  • Fix #90, #109: Support 2FA when running as a daemon by @lneely in #175

New Contributors

Full Changelog: 20260214T1908Z...20260302T2039Z

20260301T0815Z

01 Mar 08:15

Choose a tag to compare

20260301T0815Z Pre-release
Pre-release

Add new pCloud SSL certificate fingerprint to fix OFFLINE status (fixes #171)

20260214T1908Z

14 Feb 19:08

Choose a tag to compare

20260214T1908Z Pre-release
Pre-release

Changes

  • Fix #8: Add pending transfer check feature (#165)
    • New pending command to check for pending transfers
    • Uses psync_get_status() API for reliable detection
    • Client-side prompting via shared memory communication
  • Fix #107: SMS 2FA support
    • Enhanced read_tfa_code() to offer SMS option
    • Uses psync_tfa_send_sms() API

Notes

This is a pre-release build for testing.

20250602T0828Z

07 Jun 07:29
a11575b

Choose a tag to compare

20250602T0828Z Pre-release
Pre-release

Compile fixes

20250407T2152Z

06 Apr 20:52
bd576e3

Choose a tag to compare

20250407T2152Z Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: 20250309T1521...20250407T2152Z

20250309T1521

09 Mar 14:24
826c2e3

Choose a tag to compare

20250309T1521 Pre-release
Pre-release

What's Changed

  • Improve cli command parser using CLI11.hpp by @lneely in #74
  • Fix sync add command, help text for other cmds by @lneely in #82
  • Add basic 2FA by @FloFri in #86
  • Remove serialize/deserialize logic, use shared memory for return values by @lneely in #88
  • mbedtls is upgraded to 3.x by @lneely in #118
  • Prevent multiple execution of psync_fs_do_stop, and use atexit by @lneely in #91
  • CLI uses readline for better CLI UX by @lneely in #116
  • Fix deprecated function and write() warnings by @lneely in #117

New Contributors

Full Changelog: 20240825T2000Z...20250309T1521