Call for testing: OpenSSH-6.5

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On Sun, Jan 19, 2014 at 2:50 PM, Damien Miller <djm at mindrot.org> wrote:
> On Sun, 19 Jan 2014, Mauricio Tavares wrote:
>
>>       Ran 20140119 snapshot tests on Ubuntu 12.04.4 LTS x64; had to
>> create /var/empty but after that all test passed. Also compiled and
>> ran the same tests on CentOS 6.5 x64. And got the following:
>>
>> [...]
>> certified host keys: host rsa connect wrong cert
>> certified host keys: host dsa connect wrong cert
>> certified host keys: host rsa connect wrong cert
>> certified host keys: host dsa connect wrong cert
>> failed certified host keys
>> make[1]: *** [t-exec] Error 1
>> make[1]: Leaving directory `/home/raub/dev/openssh/regress'
>> make: *** [tests] Error 2
>> [raub at devcentos openssh]$
>>
>> Anything I should worry about? Or are they related to
>> openssl/something else?
>
> Those lines don't contain the actual error message. There should be a
> failed-regress.log in the regress/ directory that shows the full test
> log and failure. The one of failed-ssh.log and failed-sshd.log files
> might also contain some clues.

I was looking at the new digest API and something caught my attention.

struct ssh_digest_ctx *
ssh_digest_start(int alg) {
        const struct ssh_digest *digest = ssh_digest_by_alg(alg);
        struct ssh_digest_ctx *ret;

        if (digest == NULL || ((ret = calloc(1, sizeof(*ret))) == NULL))
                return NULL;
        ret->alg = alg;
        EVP_MD_CTX_init(&ret->mdctx);
        if (EVP_DigestInit_ex(&ret->mdctx, digest->mdfunc(), NULL) != 1) {
                free(ret);
                return NULL;
        }
        return ret;
}
ret is calloc()'ed.

int
ssh_digest_memory(int alg, const void *m, size_t mlen, u_char *d, size_t dlen)
{
        struct ssh_digest_ctx *ctx = ssh_digest_start(alg);

        if (ctx == NULL)
                return -1;
        if (ssh_digest_update(ctx, m, mlen) != 0 ||
            ssh_digest_final(ctx, d, dlen) != 0)
                return -1;
        ssh_digest_free(ctx);
        return 0;
}

ssh_digest_memory() it calls ssh_digest_free(ctx);

void
ssh_digest_free(struct ssh_digest_ctx *ctx)
{
        EVP_MD_CTX_cleanup(&ctx->mdctx);
        memset(ctx, 0, sizeof(*ctx));

}
shouldn't there be a call to free(ctx); in ssh_digest_free()  before returning ?



>
> -d
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev at mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



-- 
This message is strictly personal and the opinions expressed do not
represent those of my employers, either past or present.


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux