Skip to content

fix append to uninitialized buffer in FlatIndex::created - #148

Merged
athanatos merged 1 commit into
masterfrom
unknown repository
Mar 27, 2013
Merged

athanatos merged 1 commit into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Mar 26, 2013

Copy link
Copy Markdown

The long_name variable is not initialized. When the append_oname
function is called, it will strlen(long_name) and get a result
that depends on the stack content. The long_name is truncated to a
zero length string to prevent this unexpected behavior.

There is no sure way to trigger the problem by writing a unit
test. Unit tests are added for all public methods of the FlatIndex
class. Most of the time the tests fail if the long_name variable is
not properly initialized.

  • uint32_t collection_version()
  • coll_t coll() const
  • void set_ref(std::tr1::shared_ptr ref)
  • int cleanup()
  • int init()
  • int created(const hobject_t &hoid, const char *path)
  • int unlink(const hobject_t &hoid)
  • int lookup(const hobject_t &hoid, IndexedPath *path, int *exist)
  • int collection_list(vector<hobject_t> *ls)
  • int collection_list_partial(const hobject_t &start, int min_count, int max_count, snapid_t seq, vector<hobject_t> *ls, hobject_t *next)

There are a number of border cases that cannot be tested, such as the
logic of the lfn_get static function. Since FlatIndex code is designed
to transition from older namespace conventions, it is difficult to figure out.

The tests rely on xattr(2) and their availability is checked before
running them.

http://tracker.ceph.com/issues/4542 refs #4542

Signed-off-by: Loic Dachary [email protected]

The long_name variable is not initialized. When the append_oname
function is called, it will strlen(long_name) and get a result
that depends on the stack content. The long_name is truncated to a
zero length string to prevent this unexpected behavior.

There is no sure way to trigger the problem by writing a unit
test. Unit tests are added for all public methods of the FlatIndex
class. Most of the time the tests fail if the long_name variable is
not properly initialized.

 * uint32_t collection_version()
 * coll_t coll() const
 * void set_ref(std::tr1::shared_ptr<CollectionIndex> ref)
 * int cleanup()
 * int init()
 * int created(const hobject_t &hoid, const char *path)
 * int unlink(const hobject_t &hoid)
 * int lookup(const hobject_t &hoid, IndexedPath *path, int *exist)
 * int collection_list(vector<hobject_t> *ls)
 * int collection_list_partial(const hobject_t &start, int min_count, int max_count, snapid_t seq, vector<hobject_t> *ls, hobject_t *next)

There are a number of border cases that cannot be tested, such as the
logic of the lfn_get static function. Since FlatIndex code is designed
to transition from older namespace conventions, it is difficult to
figure out.

The tests rely on xattr(2) and their availability is checked before
running them.

http://tracker.ceph.com/issues/4542 refs #4542

Signed-off-by: Loic Dachary <[email protected]>
athanatos added a commit that referenced this pull request Mar 27, 2013
fix append to uninitialized buffer in FlatIndex::created

Reviewed-by: Samuel Just <[email protected]>
@athanatos
athanatos merged commit c8317dd into ceph:master Mar 27, 2013
liewegas pushed a commit that referenced this pull request Dec 14, 2016
install.upgrade: fix overrides of sha1|tag|branch
theanalyst pushed a commit to theanalyst/ceph that referenced this pull request Oct 4, 2017
tests: deepsea/basic: add CLI test cases and slightly reorganize the suite
liewegas added a commit to liewegas/ceph that referenced this pull request Nov 5, 2021
…rs-code-links

ceph.io/developers: rewrite "code" page
andriytk pushed a commit to andriytk/cortx-rgw that referenced this pull request May 3, 2022
…eph#148)

Problem : Adding access key to existing user not reflecting to correct
user/tenant

Root Cause: tenant name is not being populated while adding access
key operation.

Solution : added fix for populating tenant name during the execution
of access key creation.

Signed-off-by: Sanal Kaarthikeyan <[email protected]>

Co-authored-by: kupranay <[email protected]>
m-ildefons added a commit to m-ildefons/ceph that referenced this pull request Jul 5, 2023
Moisi pushed a commit to Moisi/ceph that referenced this pull request Jun 30, 2025
…xceeded

Merge in STORAGEENG/ceph from bugfix/CEPH-377-upstream-fix-rgw-dos-when-quotaexceeded to aka_version_18.2.1

* commit '8545ef7a31f7e5d27303f99795d6389cc71e29d6':
  CEPH-377 Take upstream fix for QoS when QuotaExceeded 1. The upstream fix is ceph#58378 2. Also fix a build error after    https://git.source.akamai.com/projects/STORAGEENG/repos/ceph/pull-requests/147/overview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant