Lurker News

Comments (751) 147 threads

Earlier comments
Kotlopou1 reply#
Tangent: Pangram says the text is 60-ish% AI-generated. Not that surprising given the look of the page and the work being done with AI in the first place, but it is interesting to me because this doesn't look like your standard wall-of-text AI purple prose. So it's notable that a) you can generate convincing text in this style and b) Pangram detects it anyway.
yuck39#
Panagram is just guessing.
stillpointlab2 replies#
A common complaint I've seen (and I experience on occasion) is AI agents being a bit silly in their overprotective coding style. They nit pick and catch every single little error. This can be frustrating since a lot of the time they are trying to handle edge cases that are so unlikely to happen, yet to cover them requires significant additional code.

This might be the beginning of the reason we shouldn't be reading the code. It's like in chess engines where the players complain about how weird, alien and unintuitive the moves are. But 100 steps down the line the engine finds some edge case exploit that gives it enough advantage to win.
So we may be crossing a line, right now, where the non-intuitive alien code being generated by agents is seeing edge cases down the line that might allow exploits. And if we "correct" the agent, we may be leaving ourselves open to exploits we don't see and have difficulty understanding.

akiarie1 reply#
The answer is not to reduce our understanding. That is the worst possible conclusion we could draw from what we're seeing. The answer is to increase it.
stillpointlab#
That is similar to saying to Magnus Carlson that he should just increase his understanding of chess.

The point of my comment is, no amount of "increased understanding" puts a human on equal footing to a chess engine.

ShinyLeftPad1 reply#
> non-intuitive alien code being generated by agents

You're saying it as if humans can't write that too.

stillpointlab1 reply#
I am saying that we won't be able to write it, in the same way that Magnus Carlson (or whoever your top chess player would be) cannot compete with a chess engine.

I am arguing that, much like the "best" chess move is unintelligible to best chess players, truly secure code will be unintelligible to humans.

ShinyLeftPad#
To make good code intelligible is compiler's job
kazinator#
In the TXR Lisp run-time, I spent a disproportionate amount of time on the crypt wrapper, making sure that it detects errors on numerous version of crypt, and converts them to an exception.

I settled on this. There is a block comment on the error handling, dating back to just 2023. There is a tiny infelicity in the wrapper in that we rely on the value of errno in the error path, but we do not set errno to zero and check for it being nonzero (evidence that the function set the value).
Applications using crypt directly can do the same thing: if it returns null, that's an error, of course, but don't use the result if it is less than 13 characters: that's also some kind of error token. The classic crypt() puts out a 13 character hash. Everything else is longer.

  static val crypt_wrap(val wkey, val wsalt)
  {
    val self = lit("crypt");
    const wchar_t *cwkey = c_str(wkey, self);
    const wchar_t *cwsalt = c_str(wsalt, self);
    char *key = utf8_dup_to(cwkey);
    char *salt = utf8_dup_to(cwsalt);
  #if HAVE_CRYPT_R
    struct crypt_data *cd = coerce(struct crypt_data *, chk_malloc(sizeof *cd));
    char *hash = (cd->initialized = 0, crypt_r(key, salt, cd));
  #else
    char *hash = crypt(key, salt);
  #endif

    free(key);
    free(salt);

    /* libraries cannot agree on how to report unrecognized or bad hashes:
     *
     * - older glibc versions, other libraries return null
     * - libxcrypt, integrated into newer glibc puts out two
     *   possible failure tokens "*0" or "*1", documenting
     *   that an error token starts with "*" and is less than 13
     *   characters long.
     * - musl uses "*" and "x", the latter being in the valid hash charset!
     *
     * let's go with: null or less than 13 chars means error.
     */
    if (hash != 0 && memchr(hash, 0, 13) == 0) {
      val ret = string_utf8(hash);
  #if HAVE_CRYPT_R
      free(cd);
  #endif
      return ret;
    }

  #if HAVE_CRYPT_R
    free(cd);
  #endif

    uw_ethrowf(error_s, lit("crypt failed: ~d/~s"), num(errno),
               errno_to_str(errno), nao);
  }
chekibreki#
PSA for OpenWrt users: If you are getting the post quantum message on login which points to openssh.com, you are likely using dropbear nonetheless. Check in System->Software. I was confused and worried why I seemingly had the vulnerable OpenSSH installed, but its just dropbear using an OpenSSH link.

So AFAIU, you are fine.

Load more comments